Move session detection function to EDD_Session class

Take 2...