session refactor: session store the handler instead of calling foreach request