added js validation for user roles