Add ability to switch to single tenant mode

Here's that pull request I promised with the ability to switch to single tenant mode.