make clean_session configurable