Refactor newavatar.php and show (for now) an alert on problems when setting new avatars