improve sessionhandler