If you've just cleaned some spyware or a virus from your computer, and now can't log in, instead getting a dialog box which states:

Unable to log you on because of an account restriction.

you've probably got a missing registry key.

You'll need to access the HKLM registry hive.  You can't use the registry editor in your current install of Windows, obviously, as it won't let you log in.  There are plenty of ways to access this data offline, though, although that's beyond the scope of this article.

Navigate to the SYSTEM\Select registry key, and check the data field of the value named Current.  This will be a numeric value encoded in hexadecimal.  Fortunately, the decimal value that we all understand is shown in brackets.

Now, go to the SYSTEM\ControlSet00?\Control\Lsa key, (where ? is the number you got from the Select key above) and look at the data field for the value named Authentication Packages.

This Authentication Packages value probably used to say something like:

msv1_0 c:\Windows\system32\infostealer.dll

and the spyware/virus cleanup deleted not only the spyware part, but also the Microsoft part that needs to be present to allow login.

If this data is blank, then edit the value, and insert:

msv1_0

as the data.  Reboot the computer, and you should now be able to log in.