Avatar uploading function with progress bar almost done! (WIP)