title: Passport and ExpressJS, route function not being called
body: <p>Im using passport for some admin authentication but the redirect seems to not be calling me function. As a result all that gets printed on login is [object Object]</p>
  
  <p>My code:
  Routes</p>
  
  <pre><code>app.get('/admin', isLoggedIn, Routes.admin);
          app.get('/login', Routes.adminLogin);
          app.post('/login', passport.authenticate('local-login', {
              successRedirect : '/admin',
              failureRedirect : '/login'
          }));
  </code></pre>
  
  <p>Passport setup</p>
  
  <pre><code>var LocalStrategy = require('passport-local').Strategy;
          passport.serializeUser(function(user,done){
              done(null, user._id);
          });
          passport.deserializeUser(function(id, done){
              user.getCollection().findById(id)
              .on('success', function(doc){done(doc)});
          });
          passport.use('local-login', new LocalStrategy({
              usernameField : 'username',
              passwordField : 'password',
              passReqToCallback : true
          }, function(req,username,password,done){
              user.getName(username)
              .on('success', function(doc){
                  if(doc == null || doc.password != password) {return done(null, false, "Invalid password");}
                  return done(null, doc);
              })
              .on('error', function(err){return done(err);});
          }));
      };
  </code></pre>
  
  <p>Admin route :</p>
  
  <pre><code>var adminRoute = exports.adminRoute = function(req,res){
          console.log(" ADMIN PAGE");
          res.render('admin.jade');
      };
  </code></pre>