introduce slave.js as a controller for the browser.

This means when the browser crashes (happens a lot) the client can recover from that