SSL fixes, close client when it's gone