fix password reset functionality