Nobody likes global variables, but it was the only way I managed to pass the username between scopes.