added token authentication to client