Move client.js to shared
Merge with latest loop-client shared stuff