Fixed session handling in the note creation api.