     client = helpers.getClient()
     client.post 'login', password: password, (err, res) =>
         if res.headers['set-cookie']
-            cookie = res.headers["set-cookie"][0]
-            values = cookie.split ';'
-            @jar.authCookie = values[0]
+            @jar.cookies = res.headers["set-cookie"].map (cookie) ->
+                cookie.split(';')[0]
         done()
 
 helpers.createAllRequests = (done) ->

    originalXHR = require('xmlhttprequest').XMLHttpRequest
    xhrPackage = 'socket.io-client/node_modules/xmlhttprequest'
    request = require 'request-json/node_modules/request'
    @jar = jar = {}

    require(xhrPackage).XMLHttpRequest = ->
        originalXHR.apply @, arguments


        @open = ->
            stdOpen.apply @, arguments
            @setRequestHeader 'cookie', jar.cookies.join('; ')
        @

helpers.patchSocketIO = ->
