First. You need to enter your Power options - Change power settings - Change Advanced power settings. Now scroll down to "Lid close action". What have you got here? You should have shutdown or sleep?
Ok whichever you have chosen, now go to Sound - sounds. Experiment with "sleep" or "Exir Windows", or even "Log Off"