One method I use that works very well (similar principle to the bi-carb method) is to use home-brand (or similar cheap salt, fine ground salt works better) wet the glass and immediately coat with thin layer of salt over the inside surface of the glass, then scrub with your brush or scourer that you ONLY use for glasses and has never had dishwashing liquid on it. Then rinse with hot water and air dry.
You can use this method to see how clean your glasses are as well. Wet the insise surface of the beer glass, wait 10 seconds then coat the inside surface with salt. If very little salt sticks to the inside surface then it is dirty, the salt will only stick to parts of the glass that are clean.
Most dishwashing liquids are petroleum based products and leave residues on the glass that are not water soluble so they will not be removed by heavy rinsing. Over time these residues build up considerably and kill head retention, the salt acts as an abrasive surface which removes these residues.
Cheers