Fix bug in editing password
Clean old unused code