fixing bug where password is saved when null