I don’t really understand why this error happens, as getLoginStatus returns a promise. Shouldn’t this work? I hate wrapping functions in anonymous functions, like in the first example. It’s redundant and ugly.