Multiple credentials and exports patch.

Minor changes: #386 
Patches: #389