Adds authentication to API