Added more session control