fix invalid username or userid in get_avatar error and allow anonymous to upload thumbnails