removed bug where logout operation crashed when user is already logged in