added basic auth and test, needs more work