Made the handler function for auth be a generic function who get triggered by the injector