Pill advice

Hi,

So I have been on the pill for two years nearly and have been skipping my period 3 monthly. Recently I have been getting spotting around every two months. I stopped taking the pill in the middle of my cycle to get my period. Was just wondering if I am still protected when having sex after my period finishes and I continue the pill. Please help?!?