updated tutorial; fixed  automatic session clean-up