Fix bug with resource autocompletion and authorisation