If you can move your helmet around like that, it doesn't fit you. Tightening the chin strap isn't going to change that. Either you need a smaller size, or the helmet is designed for a head shape that doesn't match yours. (Helmets are made to fit a specific head shape just as shoes are made using different lasts for a variety of foot shapes.)
I know some bike helmets have an adjuster to fine-tune the size. If yours has one, maybe that would help. Otherwise I would say you just got the wrong helmet, and need to go try on some other ones until you find one that fits.