Ion segregation in an ionic liquid confined within chitosan based chemical ionogels.