Merge pull request #10 from ngokevin/login

add login/logout flow (bug 907886)
expose thread permalinks (bug 907865)