title: ajaxSetup() call has no desired effect
body: <p>So I'm turning on token-based auth for my REST API calls to my web server.</p>
  
  <p>First I get the token when logging in:</p>
  
  <pre><code> $.ajax({
       url: "/api/v1.0/token",
       dataType: "json",
       type: "GET",
       dataType: 'json',
       headers: {
       "Authorization": "Basic " + btoa(username + ":" + password)
       },
  </code></pre>
  
  <p>And when the call succeeds, I save the token and try to make it a default parameter to future ajax calls:</p>
  
  <pre><code>     success: function (data){
           $.ajaxSetup({
               headers: {
                   "Authorization": "Basic " + btoa(data.token + ":")
               },
           });
           window.sessionStorage.setItem('token', data.token);
           window.location = 'http://' + window.location.host;
  </code></pre>
  
  <p>I got no error in the console so the call succeeded. But following ajax calls still fails and I see no <code>Authentication</code> header in the debugger.</p>
  
  <p>I have read in the official jquery documentation that this API is not recommended but it should still work, right? Oh, I'm using jquery 1.8.1.</p>
  
  <p>If I'm doing something wrong, please help me find it. If there is a better way of achieving the same thing, I'm all ears too. </p>