added the session controller, and tried to implement a JSON deserializer