isLoggedIn = working middleware