Motion detection and further improvents

better messaging,
slightly more stable socket server
better player management on the server