hook up authentication for api