rearrange/clean up, and add basic auth to admin