session logic fixed