updated session widget, implements ArrayAccess and Countable interfaces instead of extends parameter class