For the phone to connect to WiFi first you need to check the WiFi hotspot because this could be one of the major reasons your phone can't connect to the network. Make sure it is available for broadcast (you can check that on the WiFi Settings page, in case you use a router). Also, another reason to connectivity issues may be related to the fact that you performed firmware upgrade operations and you flashed the wrong baseband which in this case is something very bad.
A 4-way handshake is a protocol implementation for the Wireless technology. Basically, it's a security protocol used in establishing handshakes between clients and servers.