fixed an issue with user logout