get the username of a user in his author page

Take a look at the codex page on author templates – Author Templates

Especially the $curauth object.

In order to display author information on your author page, edit your author template file – author.php so that it figures out which author is being viewed, and retrieves all the information about the author from the database (i.e. the information entered in the User administration screen of WordPress).
This is done by setting up a variable called $curauth (Current Author).

Quote Source – WordPress Codex / Custom Author Information