Prevent Logout on Refresh

Hi, I just installed Dashboard demo ( on my localhost. However, after login, when I refresh, it’s redirect back to login page. How to make it persistent on current page during refresh (F5) and only log out after x minutes of inactivity?

add @PreserveOnRefresh to the UI class. This way the UI will stay the same when you refresh the page (until the session timeouts).

thank you for the solution. I did not expect it’s that simple.