Replace _agent by a method and get_auth_info from constructor
Merge pull request #7 from vincent-k/thread_safe_version

A thread-safe version