refs #3: use SystemRules to make code simple.
refs #3: support Digest authentication
refs #3: [refactoring] make responsibility clear.