Added JSON.registerObjectMarshaller for User and UserPreferences classes.