Added the ability to use digest authentication instead of basic.