Added a method to check for existing sessions