Move session to separate class file