Have you tried lorthon's solution:
Also, have you tried to edit the USERS_ONLINE_TIME setting on your local.config.php?
# The StatsData::UserOnline() function - how many minutes to check
Config::Set('USERS_ONLINE_TIME', 20);
Where 20, replace this with the number of minutes you would like to "keep the sessions".