finish update password function