Hi,
So your Apple ID does not work but other Apple IDs do in both your Mac User account and test accounts ?
The Serial Number should show in the Apple Icon Menu > About this Mac in the Overview tab.
If it was missing then no Apple ID would be able to sign in.
Try this:-
In Applications/Utilities open the Keychain Access app.
Have Login set top left.
Passwords, lower left and then on the right find the IDS: yourApple ID-Auth Token item.
Highlight and delete and the Restart Messages.
This should recreate this item in the Keychain but may not is the block is somewhere else.
IF the above does not work open a Finder window and use the Go Menu whilst holding down the ALT key.
Select the Library you can now see in the menu list.
Navigate to Preferences.
Find com.apple.ids.service.com.apple.madrid.plist and Drag it to the Trash.
Also find the com.apple.imessage.bag.plist and do the same (it is past all the other IDS items)
The first holds all the Apple ID and Alternatives and the second the last Server you did connect to.
Restart Messages and try logging in again.
These .plist should be recreated and it should login.
However the block could be at the server end.
If the above have not worked that would seem to be the Logical conclusion.
If so then you will have to contact Apple Support (Apple Care).
It is an Apple ID issue which is free to fix.
You may have to get your self pushed up the chain until you get someone that 1) can deal with the issue and 2) knows what to do.
They need to get the Server reset regarding your Apple ID's use on your Mac (it is a device specific Block and it can take a while to get them to look and then reset - which is normally left to the engineers now).

9:03 pm Monday; August 29, 2016
iMac 2.5Ghz i5 2011 (El Capitan)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
iPhone and an iPad (2)