fix isAuthenticated