Move session detection function to EDD_Session class