Controlling chitosan-based encapsulation for protein and vaccine delivery.