counting online entities life time to detect their timeout, returned exit button for tests