If you have another mac at home, I recommend using the OS X Recovery Disk Assistant to clone the recovery partition. Then just insert the USB into the non-functional Mac and boot from the USB, as this will allow reinstallation of the OS.
Tip: only use these steps if the built-in recovery partition is not accessible. After taking these steps I would strongly recommend that you upgrade your OS (preferably to Mavericks) if you don't want this to happen again.
There is one troubleshooting step that OS X shares with the classic Mac OS, removing preference files. But on OS X there are TWO folders:
/Library/Preferences and ~/Library/Preferences
--The latter being in your user/home folder--
Since the issue doesn't exist under another logon it is specific to that user folder. SO there is something specific to that user that is causing the problem. This takes the /Library/Preferences folder out of consideration for troubleshooting preferences. The first thing I would do is use a utility like Onyx to verify and clean the system. This includes verifying preferences files. After that rename the ~/Library/Preferences folder to something like
~/Library/Preferences-old
You'll probably have to do that in Terminal and use sudo as those files are owned by another user on the system. then create a new ~/Library/Preferences folder and reboot.
If you can now log into that account it is a simple (HAH!) matter of putting preferences files in the new Preferences folder and rebooting till you find which one it is.
No guarantee, though, that it is a preference file, it could be a startup item. So do the same thing with the ~/Library/LaunchAgents folder.
The other thing to consider is that it might be easier to just create a new user folder. Copy the things you need out of the old user folder and delete the old user. That could save you a lot of troubleshooting time. It would be my preferred way of doing it (after running Onyx) as I care less about what happened than just finding a fix that gets me up and running more quickly.
Best Answer
Try creating a new admin user (follow the steps below) and see if this new user can login without this problem. If the new account also experiences the problem I suggest using Recovery Mode to install a new copy of macOS/OS X as it could be a problem with a preference file or other system resource.
The following command will check the filesystem to ensure there are no problems. Enter:
The next command will then mount the filesystem for it to be accessible:
With the filesystem mounted and accessible, it's time to remove the file so OS X will re-run Setup Assistant:
After that, simply enter reboot and your Mac will restart and boot normally. Only this time, Setup Assistant will launch.
Create the new admin user and continue through the setup process then sign in as this user.
To re-install macOS/OS X follow these steps:
This process does not delete the original System nor does it delete your user accounts or personal data. All existing user accounts will continue to work as before and all personal data will be left intact. Some applications may require reinstallation if using this process as they sometimes install elements of their resources in the /Library folder.