added trivial cookie based session implementation