Updated backend and fixed js to work with it