Finally(!) fixed the problem with SRDA authentication and data query form submission (for details, see http://stackoverflow.com/questions/22316469/debugging-rcurl-based-authentication-form-submission).