Fix 'resend activation mail throws 404' issue

I added a check if user is logging with email then it gets the relevant
username and uses it to send the activation email. Issue url: https://meta.discourse.org/t/resend-activation-mail-throws-404/14313