Add require to custom event
fix error handling on the login