complete the password setting logic