I have just double checked: it is simply the following line that when its un-commented seems to prevent the LS client from connecting.

client.connectionOptions.setCookieHandlingRequired (true);

If I comment this out and refresh the site in the browser without changing anything else, everything works fine (albeit with the body of the notifyUser method simply being response.success(1000000,false); at the moment).