added a client access failed test script
implemented authentication against digest hash
refactored for local authenticate
refactored authorization to access dao