connectAndCheck: Connect to REDCap and verify connection
Description
A function that given an API_KEY and a url will create a redcapConnection
object and verify that it is working with a version call.
If the API key is invalid it will return NULL.
If the URL is invalid or there are multiple redirects it will call stop.
Usage
connectAndCheck(key, url, ...)
Value
redcapConnection established or NULL if key is invalid.