added flag to disable auto apply of session to api