Add the currentIdp in a generic ajaxSend block for all requests. Refactor $.ajax to $.get.