Re-structure login/logout to handle async issues

Re-structure how we handle login and logout, both for efficiency and
to handle such async issues as "logout button clicked while account
data is refreshing", which could previously cause you to remain
logged in, or to appear to still be logged in.

Signed-off-by: Jeff Godin <jgodin@tadl.org>