I'm not sure what the pains were for you, but I've had pains in the back of my head (and neck) as well (not specifically from spirulina) during my recovery and what I believe it is is the fungus attached to your brain dying or fighting back, along with regular dieoff.
And just recently when I began taking biotin in 10,000mcg a day I got more pain in the back of my head. It was definitely the fungus not enjoying being killed. So I think pain is normal with dieoff, at least headaches. They always go away after a few days though and things just improve.
From what I've read on fungus is that it will attach to parts of your brain so that it can control you through the hypothallamus (mood, appetite, stress, sleep, food cravings) to keep you feeding it.