I am writing a REST client (with AFNetworking) and need the ability to trigger the creation of a new session within a single instance of an application.
In other words,
Use AFHTTPClient (see the API client in the example project).
Credentials can be set with -setAuthorizationHeaderWithUsername:password:. Each request created from that HTTP client will have an Authorization HTTP header, kind of like a browser session.
When the user logs out, or you want to clear credentials, do -clearAuthorizationHeader.