Password reset function #2

Corrected some minor changes.