Strip whitespace from credentials

Please be aware of this fix and keep it on future pull requests!