        if xhr.status is 200
          data = JSON.parse xhr.responseText
          @token = data[0].token
+         console.log {@token}
          @addr = data[0].addr
          @connectDirectly()
 

    requestData =
      username   : "#{KD.nick()}"
      remoteKite : @kiteName
      token      : KD.remote.getSessionToken()

    # $.ajax was used here...
    xhr = new XMLHttpRequest
    xhr.open "POST", @kontrolEndpoint, yes
    xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded')

      @remoteStore.get callbackId

  handleRequest: (method, args) ->
    @scrub method, args, (scrubbed) =>
      messageString = JSON.stringify(scrubbed)
      @ready => @send scrubbed
