code: function _login (directoryUrl, publicUrl) {
    return (req, res) => {
      res.redirect(directoryUrl + '/login?redirect=' + encodeURIComponent(req.query.redirect || publicUrl))
    }
  }
docs: Login is simply a link to the right page of the directory. Going to the directory through a redirect, not throug a link in UI allows us to send along some optional client id or any kind of trust enhancing secret