Put server in new thread. Added support for SSL.