Fix invalid email address error when resetting password