moved appPages out of http.go so it's generic