function isLoggedIn(req, res, next) {
    if(req.isAuthenticated()){
        return next();
    }
    res.redirect("/login");
}
//middleware to check about logged in or not
middleware to check about logged in or not
middleware to check about logged in or not
function isLoggedIn(req, res, next) {
    if(req.isAuthenticated()){
        return next();
    }
    res.redirect("/login");
}
function isLoggedIn ( req , res , next ) { if ( req . isAuthenticated ( ) ) { return next ( ) ; } res . redirect ( "/login" ) ; }
middleware to check about logged in or not
middleware to check about logged in or not