Wi-Fi disconnects when I lock the mac
Do the following:

Find out what the network interface is for your wifi. Mine is "en1" for this example (I have obfuscated my MAC addresses with "00")

ifconfig
en1: flags=8863&lt;UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500  
ether 00:00:00:00:00:00  
inet6 0000::000:0000:0000:0000%en1 prefixlen 64 scopeid 0x5
inet 10.0.1.16 netmask 0xffffff00 broadcast 10.0.1.255
media: autoselect
status: active


Then, you need to set up the airport util for your wireless card to tell it not to shut off:

cd /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources
sudo ./airport en1 prefs DisconnectOnLogout=NO