use tls for websockets
clean up, simplifications, switching player role