I was getting this problem in red text when I tried to sign in:
ConnectionManager::invoke::Failed to find service connection url.
Sure enough, quitting App Store and deleting the two App Store files under Library/Cookies did the trick.
I also just did an upgrade from Snow Leopard to Mountain Lion.
I just wanted to add my thanks - because this also worked for me - however, I had to modify it for my situation. And here is my modificaiton - for anyone else who has the problem:
I had the same problem as described - except that I noticed that I COULD login when logged in under the guest account (or any other account). Just deleting the cookies and allowing them to recreate was not enough for me. I had to
1. login to the guest account,
2. then login to mac app store
3. copy the newly created cookie (com.apple.appstore.cookies) to another drive
5. log back in to my regular account
6. copy the cookie from external drive back to my library.
7. open mac app store and login - it worked!
So, I assume that some corrupt data is being copied from icloud or something and that's why re-creating the cookie wasn't working.
Anyway - thanks for pointing the way!!!
I tried Ed's solution (deleting the suggested files from the Cookies folder) but it didn't work for me on my Mountain Lion system (upgraded from Snow Leopard). I hunted in Library/Preferences (access by holding the option key and selecting from the Go menu while in Finder) and found: com.apple.appstore.plist. Dragged that to the trash, and voila! App Store worked again.
I did have to do a restart aftwerwards before I was able to login again and update my apps.