Improved digest authentication, fixed #12