restore changes in isAuthenticated()