req.logIn(user, function(err) {
if (err) { return next(err); }
console.log("REDIRECT", user)
return res.redirect('/');
});
})(req, res, next);
req.logIn(user, function(err) {
if (err) { return next(err); }
console.log("REDIRECT", user)
return res.render('/');
});
})(req, res, next);