code for allowing password changes