Checks if the session is already authenticated, and if not, redirects to the login page.
Sends a POST request to baseurl/auth/logout.
baseurl/auth/logout
A thin wrapper around fetch function. Checks if the client is authorized to perform a request, and redirects to a login page if not.
fetch
Accepts the same arguments as fetch.
Optional
Checks if the session is already authenticated, and if not, redirects to the login page.