Destroy the session after a test

This can help with one hard-to-find bug in tests.

Steps to reproduce will be provided.
It will not start any session that will not be destroyed right after. It only starts a session that was closed to destroy it properly. So if the purpose of this method is to destroy a session then this fix will do it in more reliable way.