Minor refactoring of login/logout process