Thanks for the testcase. Actually it works perfectly after one minor bug is fixed in the code.
Your client app's Scripts contain files WebApplication1\Scripts\SampleLibrary_intf.js and WebApplication1\Scripts\ADatoServiceLibrary_intf.js
Both these files define a structure named User
__namespace.User.prototype = new RemObjects.SDK.ROStructType();
__namespace.User.prototype.constructor = __namespace.User;
RemObjects.SDK.RTTI["User"] = __namespace.User;
When a server sends back a structure named User the client tries to read it from the stream. However server sends similar structure defined in the SampleLibrary_intf.js file while clients tries to deserialize it as a much more complex structure defined in ADatoServiceLibrary_intf.js. This results in the error you see.
To get the sample working I just removed the file WebApplication1\Scripts\ADatoServiceLibrary_intf.js from the client app sample to resolve the naming conflict.