There are two main ways to look at hydrogen bonding. The first is electrostatic, where the electronegativity of the atoms is used to describe the interaction. Your argument about chlorine being more electronegative than nitrogen is a good one suggesting that the electrostatic argument is only part of the story, and there is at least one study that suggests that hydrogen bonding does occur with chlorine in polar molecules such as chloroform.
We can increase dramatically the number of atoms considered to undergo hydrogen bonding if we take a molecular orbital approach. My reasoning here is a summary of what can be found in Inorganic Chemistry by Miessler, Fischer and Tarr. They, in turn, rely heavily on a new definition of hydrogen bonding recommended by the IUPAC Physical and Biophysical Chemistry Division.
A hydrogen bond is formed when an $\ce{X-H}$ (where X is more electronegative than H) interacts with a donor atom, $\ce{B}$. The attraction $\ce{X-H...B}$ can be described as consisting of the following components:
- An electrostatic contribution based on the polarity of $\ce{X-H}$
- A partial covalent character which arises from the donor-acceptor nature of the interaction
- Dispersion forces
The first bullet is typically the only phenomenon discussed in General Chemistry classes, and this is not unreasonable since the second bullet requires the introduction of Lewis Acid/Base concepts which may not have been covered.
It is important to note that the new definition includes what I like to call "the proof is in the pudding" where the existence of hydrogen bonding requires experimental evidence, which can be found using a number of methods:
- The $\ce{X-H...B}$ bond angle: a bond angle of 180 degrees indicates strong hydrogen bonding and would be accompanied by shord $\ce{H...B}$ bond distances.
- A red shift in the IR frequency upon formation of $\ce{X-H...B}$
- Hydrogen bonding results in deshielding of the H atom, which can be observed in NMR spectroscopy.
- Thermodynamic studies should indicate that $\Delta G$ for the formation of $\ce{X-H...B}$ should be larger than the thermal energy of the system.
While electrostatics is the dominant contributor to hydrogen bonding, an analysis of frontier orbitals can also be insightful. A thorough answer requires a fair amount of MO theory background, but for those interested, looking at the MO diagram of $\ce{FHF-}$ will be helpful. In brief, the base ($\ce{F-}$ in this case) has a filled $p_z$ orbital that gains access to a delocalized orbital with lower energy, thus validating the formation of a strong hydrogen bond.