fix few bugs (session time out)