Many fixes like the below can be found on the WWW:
http://windows7themes.net/fix-temporary-profile-error-in-windows-7.html
but none of them worked for me. I eventually just deleted the appropriate profile folder in C:\Users as well as the appropriate .bak folder in the registry, under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\ProfileList
and a new one was created.