honor existing id and format in resoruces, otherwise set tokens for them. thanks @harikt and guillaume ferrand. fixes #33