Separation anxiety happens because the child cannot maintain an image of you when you are out of sight..... this is a learned thing, and takes time. A few things help or speed the process. When you need to go to the bathroom, try to keep talking or singing while you are in there, so the sound of your voice is reassuring. At bedtime, playing a CD or cassette you have recorded reading stories helps reassure them and eases them into sleep. For the learning part, 3 games help. Plain old peek-a-boo. Where's-the-button? : you hide a toy under a blanket or behind a pillow, and ask "where's the -----/" Begin by having the child see you hide it, and help them find it at first. Then progress to hide it while they see it and then they find it on their own, and finally, hide it and have them look (be prepared to help if they get too frustrated). Third, Hide and Seek helps them to learn that things out of sight are not gone forever. Helps them get over that fear with "baby steps". After a bit, these games start to delight your child, and this is a good time to let Dad join in.
Rest assured, there will be times when you child will prefer your husband and ignore you. When my son was 20 months or so, he prefered the men in the family: hung out with Dad, Grandpa, Uncle, and shunned the aunts, Grandma and me. He outgrew that after about 6 weeks. It is part of the learning process. I hope your husband can tough this out with his feelings not too bruised.
Best of luck.L.