First implementation of sessions