Phuket airport has traditionally been one of, if not the worst, entry points for anyone with any sort of recent history of staying in Thailand of tourist visa's/exemptions etc.
Even still, I'm surprised you were refused entry with just 5 months of living here, especially as you have a tourist visa.
Fly into Chiang Mai, or use a land border.