code: function afterlogin (err, next, req, res) {
      if (err) {
        return req.seneca.act('role: auth, do: respond', {err: err, action: 'login', req: req, res: res}, next)
      }
  
      if (req.seneca.user) {
        req.seneca.act('role: auth, set: token', {
          token: req.seneca.login.id
        }, function (err) {
          return req.seneca.act('role: auth, do: respond', {err: err, action: 'login', req: req, res: res}, next)
        })
      }
      else {
        req.seneca.act('role: auth, do: respond', {
          err: (err ? err.why : 'Unknown error'),
          action: 'login',
          req: req,
          res: res
        }, next)
      }
    }
docs: LOGIN START