add XMLHttpRequest support (and cookie passing support)
Clean up some `env` tests.