some progress on login/out