The nation is the foundation of democracy. Nations are based on the idea of self-determination and the idea that political legitimacy comes from the people. This means that citizens can always attack their government for failing to live up to democratic claims.
Rejecting nationalism doesn't mean rejecting the nation. Many critics of nationalism in fact feel that the so-called nationalists are the ones betraying the nation by oppressing large parts of the population and enriching themselves at the costs of the nation. Most believe that it is possible to love one's nation while rejecting dangerous nationalism.