router.get('/profile', function(req, res, next) {
res.render('profile', { title: 'profile', user: req.user });
});
app.use(function(req, res, next){
res.locals.user = req.user;
next();
});
if user
p Hello, #{user.id}, good to see you!
else
p Please log in...