My son went through a stage like that at about 4. He could be revolting at times. It is about testing limits.
I can thoroughly recommend a book titled "Raising the Spirited Child' I can't remember the author but search the title and you will find it. It may help and definitely worth a read.