fix isAuthenticated()