introduced SSL support (not fully implemented yet)