upload avatar functionality - fix issue: web cam does not stop after closing