removed unnecessary endpoint methods, fix token handling issue in javascript