President Joe Biden agreed with Congress that TikTok posed a national security threat and signed a law to ban the app if its Chinese owner did not divest.