Digest auth, brief review, changes, not tested but seems ok.

Default 'admin' user credentials (realm 'priv') : admin // adminpass

Used :
    $ htdigest -c ht_digest_pwds priv admin