better ssl support, including for ws