Correctly assign the user's home directory (see #6297)