Add user impersonation code, fix up team stats page.