add type="button" to prevent form submition on remove user/role
enhance validatePermissions function by comparing array regardless the order