Removed unnecessary conditions from logout, isAuthenticated, and
isAuthenticationValid.