common: Rework the simple password query module.