added security layer

security layer for role
fixed role security issues