Use logger from the beginning. Allow to define credentials in config file. Closes #2.