Register client and assign ids to each unique client (ie make the Java server equivalent to the C++ server).