Don't close socket if auth fails.

Also, check if the socket exists first...