Improve password handling and initial setup