Fixed password setting and made passwords in DB idempotent