implemented ssl disconnect