isLoggedIn middleware implemented into the routes