added session checker, not final yet