setup standalone auth and generic api query method