created event publishing code for the server covering joining and leaving the lobby