Closing connection if fails registering UA