add response handling, add autentication, add tests