start flattening out _establishSession to make it easier to follow logic
continue flattening the _establishSesssion method
finish flattening _establishSession logic