Assuming you've mapped the port in your Docker command ("-p 9981:9981" by docker run, or "ports: - 9981:9981" in docker compose), you can just access it at http://ip.of.computer.running.docker:9981
Make sure you don't have a conflicting install of tvheadend running elsewhere and using the same port.
Make sure the data folder you pass in your Docker command doesn't exist yet, if you are starting from scratch.
Make sure you're not running anything else on port 9981 (like an old installation of tvheadend).
Make sure your web browser doesn't have stored credentials from a previous tvheadend instance.
You can log out first at http://ip.of.computer.running.docker:9981/logout and as the page says "cancel the next authorization to correctly clear the cached browser credentals (login and password cache). Then click to the 'Default login' (anonymous access) or 'New login' link in the error page to reauthenticate."
And finally, I like to open the web interface in a fresh incognito/private browser window, to avoid using cached credentials.