In case the session is lost, you will see the error message in the below screenshot in TM maintenance, when triggering a search.
Instead you should be redirected to login-page.