who did john quincy adams run against while president?