Avoid crash when trying to logout a not authenticated user.