added assigning of client id upon connection with the server