Is there a way to update the login status on callback in the application
The problem with browsers is that using the back button does not refresh the page to any form of data on the server, or force the browser to run any JavaScript load functions.
What you can do is set the JavaScript function to timeout to check if they register every 10 seconds using AJAX.
I wouldn't bother as you are adding additional server load with no real benefit, as when the user refreshes the page or clicks on a link, they will still be logged out and unable to perform any action records.
source to share
Most likely, the pages will be cached in the browser.
Install the app on server-side pages, disabling their caching - this way returning them will reload them from the server and display the logged out state, rather than pulling them out of the browser cache.
How to do this is outside the scope of the question. Google for "no-cache" and "Expires" headers.
source to share
Add nocache tags to <head>...</head>
your secret pages.
<META http-equiv="Pragma" content="no-cache">
This is because when you visit a page on your site, the page is automatically cached in the browser. And when you come back after logging out, these pages are served directly from the browser cache. You need to disable the cache so that when you return after logging out, these pages are called from the server again.
source to share