add session managerment and refactor rename ip related classes