Make authentication drivers Thread-safe

Setting and getting authentication state was Thread-unsafe so that
caused 'can't add a new key into hash during iteration' in race
condition.  Introduce Mutexes.  Closes #200.