Basic API authentication with tests