Implements avatar uploading