First part of password-reset code