         authenticity_token: token
 
       # PhantomJS doesn't send any data with DELETE, so fake it here.
-      headers = Object.create JSON_HEADERS
-      headers['X-HTTP-Method-Override'] = 'DELETE'
+      deleteOverrideJSONHeaders = Object.create JSON_HEADERS
+      deleteOverrideJSONHeaders['X-HTTP-Method-Override'] = 'DELETE'
 
-      makeHTTPRequest 'POST', config.host + '/users/sign_out', data, headers, ADD_CREDENTIALS
+      makeHTTPRequest 'POST', config.host + '/users/sign_out', data, deleteOverrideJSONHeaders
         .then =>
           @_deleteBearerToken()
           null

        client_id: config.clientAppID

      console?.log 'Requesting a new bearer token'
      makeHTTPRequest 'POST', config.host + '/oauth/token', data, JSON_HEADERS, ADD_CREDENTIALS
        .then (request) =>
          response = JSON.parse request.responseText
          @bearerToken = response.access_token

          login: login
          password: password

      makeHTTPRequest 'POST', config.host + '/users/sign_in', data, JSON_HEADERS
        .then (request) =>
          # The response contains a JSON-API "users" resource.
          client.processResponseTo request
