Fixed authentication for custom_rest