Better logging and credentials-helper bugfix