Add option to disable the portal (issue #3355)