login/out reorganization