Check for correct credentials

Fixes #24