Defer resolution of login promise until user object is set, fixes #199