Add missing imports, undefined variable fix

Missing imports introduced in https://github.com/openmicroscopy/openmicroscopy/commit/08e94b60886780ca01aa86211bf592fe9b39b6b1

Missing variable `server_id` introduced in https://github.com/openmicroscopy/openmicroscopy/commit/082f7de7316517c79e8b5b621bda4e3b622d149a