getting basic auth working, still sloppy though