HELP! ASAP

Started my active pills the 7th at a new time (10:30PM) and my time previous was (10:30AM). On the 13, I bled heavily and experienced a large amount of brown discharge. This also came up very bad cramps and diarrhea. Now it is the 17th and I thought I would be off right now but there was still some spotting left in my underwear. What is going on and when will it end? And am I protected or is my birth control glitching out in some way?

*Important to note I missed the first period of my first birth control pack taken last month*