Various http/cookie fixes