Initial Digest Auth cleaned up code