US president signs bill preventing government shutdown