Attach authentication to API