Fixed issue where an empty password was saved into the database