Check a valid API route

For requests to the API, check the route is valid, and if auth is
required check a token has been supplied.