large JavaScript functionality improvements

a multitude of additional functions have been added to facilitate robust
multiplayer matchmaking and server/client communications