There is a bug in Ubuntu 9.10. Description is just like this stated in http://ubuntuforums.org/showthread.php?t=1305693
"I get as far as the gdm login screen, enter my info, get a brief flash, and am promptly returned to the login screen again. No error message; nothing."
First you have to edit .bashrc in your home directory and comment out this line
# export XAUTHORITY=$HOME/.Xauthorit
than delete monitors.xml file under $HOME/.config