Refactoring digest auth, and using an nc so we don't have to generate a 401 everytime before we make a request.