Hi,
There may be a program that is still running in the back ground causing it to hang. If you launch the task manager, can you see any processes taking up a lot of cpu time? You may also want to see if you have folder synchronization running as well, where it is trying to sync files offline when you logout, which could be causing it to hang. If you have installed any software recently and then it started to do this freezing, I would uninstall it to test, but uninstall it only one at a time so you can see if there is a specifc one causing it. I would also run antivirus scan and also a malware scan to be sure the computer does not have an infection (program called malwarebytes works pretty well for malware detection and is free). Also, if you boot to safe mode, are you able to log out without it freezing? Safe mode runs with minimal drivers and services, if it logs out fine from there, I would then use a CCleaner to disable services from launching at start up. Make sure you know what the services are though before you disable them. If you are unsure of what a service is or does, I would use google to see if it is ok to disable it. If the pc will let you log out without freezing after doing this, start enabling them again one at a time to see if it locks up with any of them.