Fixes to get Digest authentication working