Use a cookie to store error data instead of the URL querystring

The querystring was ugly, and also resulted in overlong requests on some setups