I've thrown up from MDMA
before, after downing about a gram (what a stupid decision) in the course of 6 hours.
Your headaches could be, as mentioned, from dehydration or the jaw clenching.
My advice (if it's worth anything) is - find your dosage "sweet spot" and stick to it. Decide before going out how much you're gonna take, and stick to it - if needed, leave the remainder at home. Decisions regarding re-dosing can be very hard while intoxicated.
zenchicken added 4 Minutes and 10 Seconds later...
Be aware that doing more later on in the evening will *not* return the initial rush and "good feeling", it'll just make the experience speedier usually.
You have mentioned doing a line before getting in the club, then 2 bombs afterwards. Perhaps you could skip that line and bomb once you're in the club - when it hits you, you'll already be in a dancing environment, etc, and it'll also delay the experience so the craving to do more will also be delayed.