Editing controllers for intern, sessions, application to respond with json.