Implemented password reset function.