I just figured it out.
I can use this:
<?php echo $curauth->nickname; ?>
So long as I changed some above script to this:
<?php
$curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
?>
Thanks for your help.