add an autoflush parameter to session to allow autoflush behavior

Fixes Issue #3