fixes authorization for json