title: Passport + Express4 + local strategy - req.isAuthenticated return false
body: <p>After using <code>req.login</code> with passport the <code>req.user</code> is returning the object. When i want to check if the user still logged in, the req.user is empty and <code>req.isAuthenticated()</code> returns false. Working with angular $http Any thoughts? thanks.</p>
  
  <p>passport.js</p>
  
  <pre><code>module.exports = (app) =&gt; {
  
  // var LocalStrategy = passportLocal.Strategy;
  
  app.use(expressSession({ secret: 'mysecret' }));
  app.use(passport.initialize());
  app.use(passport.session());
  
  passport.serializeUser(function (user, done) {
      done(null, user);
  });
  
  passport.deserializeUser(function (user, done) {
      done(null, user);
  });
  
  passport.use(
      new LocalStrategy({
          usernameField: 'email',
          passwordField: 'password'
      },
      function (email, password, done) {
              new AdminUsers({ 'email' : email })
                          .fetch()
                          .then(function(user) {
                              // if user doesn't exists
                              if (!user) return done(null, false, { message: 'User doesnt exists' });
  
                              // use bcrypt to encrypt password while save, and to compare.
                              bcrypt.compare(password, user.attributes.password, function (err, res) {
                            if (!res) return done(null, false, {message: 'Invalid Password'});
                          });
  
                        return done(null, user);
                          });
  }));
  }
  </code></pre>
  
  <p>login call</p>
  
  <pre><code>login: (req, res, next) =&gt; {
      passport.authenticate('local', (err, user, info) =&gt; {
        req.login(user, (err) =&gt; {
          if (err) {
            res.json(err);
          } 
          else {
              res.json({ 'redirect' : '/' });
          }
          return;
        });
      })(req, res, next);
  }    
  </code></pre>
  
  <p>And to verify</p>
  
  <pre><code>res.send(req.isAuthenticated() ? '1' : '0');
  </code></pre>
  
  <p>EDIT: req.session doesn't store passport session after a successful login.</p>