Changed auth to use a callback instead of an event