Implemented credentials.

Closes #8.
Merge pull request #16 from jussi-kalliokoski/credentials

Implemented credentials.