Starting fixing #2

Sorry to say this, but if you don't know what something does, don't try to use it by porting it from Java to PHP.

Looking at what you did, you could have just used an array instead of the Sessions class.