fixing bug that causes user password to be reset after edit