title: Can you authenticate with Passport without redirecting?
body: <p>I have the following working code to authenticate through the passport-local strategy:</p>
  
  <pre><code>  app.post('/api/login', passport.authenticate('local-login', {
      successRedirect : '/api/login/success',
      failureRedirect : '/api/login/error',
      failureFlash : true
    }));
    app.get('/api/login/error', function(req, res) {
      res.send(401, {error: req.flash('loginMessage')});
    });
    app.get('/api/login/success', function(req, res) {
      res.send(200, {user: req.user});
    });
  </code></pre>
  
  <p>However, ideally I want to handle the errors and success messages from one express route, and not redirect to two extra routes.</p>
  
  <p>Is this possible? I tried using a 'custom callback' but that seemed to error out on serializing users for some reason.</p>