Was getting the message: “An unknown error occurred” when trying to sign into the Mac App Store with my Apple ID (This is on OSX 10.9 Mavericks).
Solution (weirdly) is to move/delete the following file:
And restart your mac. It does work. Don’t forget to restart before you try signing in again.