override res.writeHead to write session cookie (stupidly took this out)