(v1.08) add support for login_hint param in authmanager.

Enables automatic account detection for multi-login scenarios. This
should prevent 404s when opening from secondary accounts from Gmail.
(v1.09) Pass userId from state as login_hint in authmanager.

Factor our parseState_() and call before authorize() so userId param is
available.