President Joe Biden has signed a bill into law that averts a US government shutdown.