update user logic