added clearing of stale sessions