Theoretical studies of molecular ions. Vertical ionization potentials of the nitrogen molecule