refactor listeners so some of the auth and listener removal code isn't duplicated