Debugged password change function