The House passes a bill mandating detention of unauthorised migrants, marking President Trump's first legislation to sign amid bipartisan support.