I have an iMac with Mac OS X 10.8 (Mountain Lion). When I open the Mac App store, and try to download an App, it asks me for the login. When I enter my Apple ID's email and password and click login, the button become gray for a moment, and then asks me for the credentials again. There is no error message displayed. The email and passwords are correct, since if I try an incorrect password it tells me that it is wrong.
I've solved installing the manual updates for Mountain Lion from here, and then it began to work normally!
I had an issue where I couldn't login to the Mac App Store or iCloud. It also wouldn't let me sign-out. It would just get stuck loading, nothing would happen and I would be asked to login again
- Go to Settings > Users and Groups and create a new admin account
- Logout of your account
- Login as your new admin account
- Go to Settings > Users and Groups and change the password of your main account
- Sign-out of your new admin account, log in to your main account and give it another go
When I was looking there were lots of complicated solutions involved in resetting NVRAM, deleting files and caches stored in /library but this is what did the trick.