Add events for socket connection