Rework password handling