Move onAuthenticated XAUTHORITY generation to the helper

This avoids it being created as root and then chown'd.
Merge pull request #280 from MartinBriza/lessroot

Move onAuthenticated XAUTHORITY generation to the helper