Since all templates have the current loggedin user as logged_in_user var (a Koha::Patron object), vars loggedinusername and loggedinusernumber should be replaced in templates.