code: function addTemplateVariables (req, res, next) {
    res.locals.profile = req.user;
    res.locals.login = '/auth/login?return=' +
      encodeURIComponent(req.originalUrl);
    res.locals.logout = '/auth/logout?return=' +
      encodeURIComponent(req.originalUrl);
    next();
  }
docs: Middleware that exposes the user's profile as well as login/logout URLs to any templates. These are available as `profile`, `login`, and `logout`.