upgrade xmlhttprequest to 1.6.0 and make use of setDisableHeaderCheck(true) so that it is possible to add cookies
Add any request headers passed in to the io.connect method options.headers