delete unused lines and provide checks on password in profile.js