update avatar server logic