Add authenticator for client

Add initial implementation and test.

Also add support for async tests.