ASP.NET : How to solve logging out before timeout expires problem

A while ago I had a task of setting up an old ASP.NET 3.5 application on a shared hosting server and after I was done, the application worked as it should except for one important bit. The application used a Forms Authentication to authenticate users and after users logged in they were getting logging out and redirected to login page after a really short amount of time, usually only after a few minutes.
In this article I will show different ways I tried to locate this problem and how I finally managed to fix this issue.