implements js client for testing, fixes bug in socket server when rvals are 0

Signed-off-by: Chris Hannon <chris@channon.us>