Refactor passing the user name into the view.