added linkDeviceToUser in RESTful interface