you loose the connection because the computer goes to sleep when you close the lid, and as far as i know there's no way of stopping it from doing that unless you download a third party application. As for the having to restart mmmm no idea :.
supposedly after you open the lid the computer goes out of sleep and it takes a few seconds for it to recover the wifi signal, if it doesn't it's probably out of range it happens to me a lot, i have to go to the next room where the wifi reception is better and restart the airport and then i can go back to my room without loosing the signal, wired i know :s
you loose the connection because the computer goes to sleep when you close the lid, and as far as i know there's no way of stopping it from doing that unless you download a third party application. As for the having to restart mmmm no idea
If you want your computer to stay on with the lid shut you can try a program called InsomiaX. Other than that, the computer should NOT be restarting, but instead, waking from sleep.