Fix flagging to handle session clearing, modify tests

Fixes #185 and modifies tests to clear sessions whenever a source/journalist will likely close their browser.