adds upload avatar functionality