Add unittests to check if using an alternate user works as expected