login/out fixes