Move authenticator base to lib