implemented api endpoints, services and controller functionality for POSTing and GETting sessions