added context to onLoggedIn

This change allows us to access the user object on onLoggedIn, like in the api methods.