session close when app terminate