Fixed authentication in REST.