Attach a global onBeforeCall listener to all AJAX call except for one
<p>I'm having numerous AJAX call using JQuery. Among these is an AJAX call, let's say <code>auth()</code> that checks whether the user is currently logged to the system, idle, etc, and if not, will cause the page to redirect to the login page.</p>

<p>This <code>auth()</code> function is called every minute. Other than that usage, I want to call this function on before every other AJAX call that will be made&mdash; just to ensure that they are logged to perform a transaction.</p>

<p>I'm thinking of using the <code>beforeSend</code> property of <code>$.ajaxSetup</code> to achieve this, but won't it also be attached to <code>auth()</code> since it is also an AJAX call? I can confirmed this because I have tried using <code>beforeSend</code> and it throws an error:</p>

<pre><code>RangeError: Maximum call stack size exceeded
</code></pre>

<p>How can I select all AJAX call (except for <code>auth()</code>) and attach it an <em>"onBeforeCall"</em> listener?</p>