What browser is that ? You say the flarum tab is open at browser startup ?
Could it be that the tab is reloaded from cache, and as such "doesnt know" it's been logged out in the meantime ? This happens on my Android phone with Firefox Mobile on some websites, when I open the browser it loads the previous pages, but does so from cache and so any token on the page has become invalid in the meantime.
Do you actually need to sign out before signing in again or just refreshing the page shows you're logged out?