The first thing to do is make sure it is specific to your user and not system wide. What you can do is try to login as a different user. If you don't have a different user account, create one from the console. Then try to login with that new user. If that works, then it's probably some config file in your home directory and you can continue with what I did below. If it doesn't work, then you should look at your X logs and config to figure out where the problem is.
If you were able to login as the other account, then do the following:
Login from the console as your user account that is having problems.
In your home directory create a folder called hidden_files (or whatever you want to call it, just a place to store all the hidden files/folders so they don't get processed at login).
I started with moving folders I knew get processed at login. Try moving your .bashrc .bash_profile .xinitrc .xsession .dbus and any other folders you know get processed at login (maybe .kde .config .gnome depending on your DE) to this new folder.
Code:
mv .bashrc .bash_profile .xinitrc .xsession .dbus ~/hidden_files
Then try to login. If it works, move the files back to your home dir one at a time, trying to login after you move one so you know what the offending file is. (except .dbus, don't move it back because it gets recreated automatically.) If it doesn't work, hopefully you have some time
if you have a lot of hidden folders and files.
If it didn't work, you need to move all hidden folders/files to your hidden_folder directory. Run the first command to make sure you are getting only hidden folders/files and not everything in your home dir. Then run the second to actually move the hidden files.
Code:
find /home/user -maxdepth 1 -iname .[a-z]\*
find /home/user -maxdepth 1 -iname .[a-z]\* -exec mv {} /home/user/hidden_files \;
Now try to login. This is where it worked for me, so I started moving files back from my hidden folder to my home dir. I grouped them all together by letter to make it quicker.
Code:
mv /home/user/hidden_files/.a* /home/user
Then try to login, if it works then
Code:
mv /home/user/hidden_files/.b* /home/user
Then try to login. Keep doing this until you find the folder/file that is causing you trouble.
Hope this helps. If you have any questions or it doesn't make sense let me know.