Add comparison function for credentials class.
Handle null credentials object in the comparison.
Add first simple unit tests.
Make the test a bit less idiotic.
Fix test failure.
Issue #4: close security hole that allows unauthenticated access after a successful auth for a whole cache duration.