refactor of password change methods