basic support for https
still needs some work to make https not interfere with web sockets...