Refactor auth to events, fix some event issues