Added support for role mapping to applications and realms