Loosing connection after a while, trying out pings.
Fixing ping.
Add a layer of security for sockets.

Only allow setting up a socket if the user has recently visisted the
projects index.