First of all, the world shouldn't panic.
North Korea can't possibly use their bombs to attack other countries. It would mean their total destruction in a matter of hours, if not minutes. They can't bomb South Korea, Japan and even less the USA without getting the same treatment tenfolds.
The worst that could happen would be if North Korea mistakenly launched a missile due to some error on their part. Sure it could happen. But it could happen anytime in any country that has bombs.
Kim Jong-un might be insane, but he doesn't want to lose his power, and, of course, he doesn't want to die either. He will do everything in order to keep that from happening.
Let's keep in mind that the USA has conducted over a thousand of bomb tests in the last decades. Russia and France also had their share of bomb tests. Being a democracy doesn't justify bomb testings.
The biggest threat is not North Korea, but those who might want to buy North Korea's bombs and hire this potentially newfound H-bomb expertise. Spying is, to me, the best solution so far, because North Korea is already isolated and sanctions won't harm the regime. Sanctions would probably mean more North Korean civilians suffering.
Of course, if the international community had the guts to do so, they could put additional pressure on China, North Korea's closest ally. But China is too powerful now and even they aren't too happy with North Korea's bomb tests.