Implemented sessions (step 1 of 2 in making the API REST)