A function that wraps a standard fetch call with logic to inject the current user's authentication token.
This function has the same function signature as native fetch
See tests for more examples.
If the function cannot acquire a token, or a 401 response is received, the user is automatically redirected to the login page. Redirection blocks promise resolution, so there will not be an opportunity to handle these cases.