Obama says U.S. democracy is at risk