Tweaked adding/removing roles to realm and applications