we can only close the session if encryption is not used