To disable xgl you should issue the command
which I mentioned previously
gnome-xgl-settings --disable-xgl or
gnome-xgl-switch --disable-xgl
you should do this from your shell if you can't log into X then try going to init 3 (pass init=3 to your boot loader) or press ctrl->alt->F1 and then login then issue that command
this will disable xgl and restore your previous session
Check out this guide which explains how to install XGL on Ubuntu:
https://help.ubuntu.com/community/CompositeManager/Xgl
or try and google for XGL and Ubuntu there is a lot of information out there....
Hope this helps