Germany beats U.S. 1-0, both teams advance