change session save to teardown_request