Fix folder api end point and add session setting