Implemented credentials.

Closes #8.