fixing password update
adding beforeupdate