Turn off the debugging window for xsession cmd. I think Kris turned that on when writing the environment stuff.
Move the xauth commands to when the xserver is not currently running and see if this lets it work