function isLoggedIn(req, res, next) {
    if (req.isAuthenticated())
        return next();

    res.send("Please sign up and log in");
}
// route middleware to ensure user is logged in
route middleware to ensure user is logged in
route middleware to ensure user is logged in
function isLoggedIn(req, res, next) {
    if (req.isAuthenticated())
        return next();
    res.send("Please sign up and log in");
}
function isLoggedIn ( req , res , next ) { if ( req . isAuthenticated ( ) ) return next ( ) ; res . send ( "Please sign up and log in" ) ; }
route middleware to ensure user is logged in
route middleware to ensure user is logged in