Barack Obama warns 'democracy itself' is on the ballot