Fix credentials-with-space bug (bug 1065)