fix authentication, json parsing