Improve the avatar uploader

Improve the avatar uploader: