Fix auth issues in API