[#WIZ-222] Automatic logout when session expires does not work both on main page and when modal windows are opened