implement chat functionality on the server. user global value to distribute user ids rather than array index