Avoid crash when trying to logout a not authenticated user.

Avoid crashing on logout for non authenticated users