Replaced the email-as-username package with custom code