improve api usage

fix ssh_keys
improve authorization handling