added token auth and api code