added session abstraction, changed a lot of pages