Added role-based security functionality.