Allow multiple sessions
The input file is referenced at the server level, instead of the session. This was initially made to allow opening other files, by storing the file to be loaded in a quasi-global variable, triggering a session reload and consequently reloading the whole app from scratch with only the new filepath as a state preserved from previous session.
Problem: With multiple opened tabs connected to a same server, on refreshing one tab, the tagging UI may reload and show the file opened in the other tab.
Expected behavior: On reloading a browser tab, the UI should reload the same file as previously shown in the tab.
Proposal: Replace the global variable mechanism with requests and values passed using forms and hidden fields.
I am not sure whether this will fix the problem with different files in multiple tabs. We'll see.