Added basic auth to API routes