Made session class auto-flush.