respect the session expiration on all pages

@russian-dima So from what I understand, it is only to introduce the my code from above in the js file to make it public?