Fixing logging out