Close socket on authorization error.