user login/logout fixes