if (subfield(req.url.qs, "user", "&") && subfield(req.url.qs, "pw", "&")) {
  set req.http.Authorization = "Basic " + digest.base64(subfield(req.url.qs, "user", "&") + ":" + subfield(req.url.qs, "pw", "&"));
  set req.url = querystring.filter(req.url, "user" + querystring.filtersep() + "pw");
}