Tweaking login events.

Need to make sure that the api supports cross-domain.