app setup, plus getting basic ajaxy auth stuff working