add login/logout flow (bug 907886)