Unfortunately it isn't her sons fault. It is her fault for allowing him to get to this stage. Anxiety, guilt and various other emotions would be, in my opinion, the reason for this.
For whatever reason the divorce from her husband, wanting to keep her child 'happy', pampering to his every need, rather than dealing with the precociousness of a child going though the changes of missing a one time father figure and seeing you as a replacement.
Unless she's willing to see reason and negotiate together how you're going to counter his behaviour as a 'team', because he needs to see that she backs you up with the decisions you make and vice versa, it will never work.
Kids need to see that they can't get away with what they do. Having a parent that breaks down to their every need, undervalues that parents role in his/her life. It's a divide and conquer attitude.
She needs to come to the party a lot sooner than you as a disciplinarian in her sons life. You stepping into those shoes without her support will just have him resent you. Why should you tell him off when mum doesn't?
She needs to grow up and start acting like a parent or she's making a rod for her own back that is going to gradually get worse over time.
Unfortunately for you that will reflect on how she responds to your relationship as well. Rather than dealing with it she'll have soothing words and try not make you feel bad.