Added token auth option for the rest api