Pass the phone number typed on login to the forgot password page, prefilled:
Users usually go there right after a "Wrong credentials" error, to reset the password of the account they just typed.
Same for registration: a user who typed a number on login and then taps register just realized they don't have an account. Carry the number there too.