fix login/out