Fixes to the password system