Improved the password reset functionality.