add advanced session validation