More fixes, tweaks to password handling etc