Cleanup isAuthenticated.