Switch API to use auth tokens instead of basic auth