Authentication and api object creation.