Using transaction to determine session length