Javascript client implementation