Updated password reset functionality so that it actually works.