What the heck.

So I have been having horrible, horrible cramps. The worst I've ever had so I though I was about to start af, but for the past two days I've had light brown discharge. I've taken a test this morning and bfn glow says af due tomorrow. I don't know what the heck is going on. Someone please help