Currently, when the user clicks on the logout button, they are logged out. If they have unsaved changes, there is a modal asking them if they want to save the unsaved changes.
If the user cancels the navigation, they will stay on the page, but it will behave as if the session timed out.
If the user does not want to save the changes, everything works fine.
If the user does want to save the changes, they are redirected to the login page. However, the changes are not actually saved until the user logs in again (with the same session, so without reloading the page). This might be confusing to the user as they could expect that the changes are saved as soon as they click on the save changes button.
Questions to consider:
- What happens if the session times out when the user tries to save the changes?