A few times I’ve had issues with signing in or out of the Mac AppStore. The sign out may be greyed out or the login sheet does nothing.
After removing the related preferences noted elsewhere and verifying that my Apple ID billing info was okay, I did not want to log out or reboot. Killing the storeagent got things working again for me. (It is a LaunchAgent, so it will start back up again.)
In Terminal:
killall storeagent
Then try sign in to the Mac AppStore again.