login/out bugs fixed