Expanded DigestAuth code