code: function authCallback(err, user, info) {
    // jshint validthis: true
    var error = err || info;
    if (error) {
      return this.res.unauthorized(error);
    }
  
    if (!user) {
      return this.res.notFound('Error, please try again.');
    }
  
    var token = auth.signToken(user._id, user.role);
    this.res.ok({token: token});
  }
docs: Authentication callback function. Called from passport.authenticate in
  {@link auth:local~authenticate}. The request and response objects are available
  as this.req and this.res.
  @param {Error|String} err - The error that occurred while authenticating the user
  @param {user:model~User} user - The user object to authenticate
  @param {Error|Object} info - Additional information, treated as error
  @return {http.ServerResponse} A response object with the signed token
  as the 'token' property.