Implemented sessions and tests