Moving session creation/destruction to rest client library