refactored register function so that random avatar url is generated first, user is saved to DB, & if no error, downloads avatar url & saves to s3.