Testing this on my local dev site, the problem seems to be that neither the username or email parameters get set for the POST request that’s made to /u/action/send_activation_email when the request is made after a user who has not clicked the link in the activation email attempts to login with a username/password:
If, instead, the user clicks the Resend Activation Email button from the account-created page that’s displayed immediately after registering an account, the username parameter is set for the request. For reference, the button that is working is this one:
My guess about what’s happening is that for the request that is working, is that the parameters for the POST request are being set based off the values the user enters when they complete the signup form.
The 404 error is being triggered here:

