fixed bug with login/logoff