Fix isAuthenticated