Foreign nationals who stay in the US longer than 30 days must register with the government and a failure to comply can lead to fines and imprisonment, the Department of Homeland Security under the Donald Trump administration has said.