implemented the same code to reset the password in the settings