Updated index.html socket handling.