Remove roles in impersonated session

I have to remove some roles within impersonated session. There is any possibility to do that?
Already I’ve created custom authentication module for impersonated login but I don’t how to achive my goal.