Fixed for issue #2320 Redirect to login page when session has timed out and page is loaded

Refactored the `SessionIdleTimeout` in `session_timeout_middleware.py`.
If the session has timed out, redirect the page to login.