I'm trying to build authentication system with ExpressJS and PassportJS. example app form Github https://github.com/jaredhanson/passport-remember-me and Strategy , mongodb = require('mongodb') , mongoose = require('mongoose') . the user will be redirected to the // login page. function ensureAuthenticated(req, .