Fix bug in LoggedIn() routine