Server code for Online Game