Fixed misplaced code for passwords