Fixed a problem with password authentication - this was very non-intuitive as it does not seem to match the documentation.