Add functional test for credentials
Add license headers to new files and fix a typo.