Fix errors in port to new Leaflet - breaking UI when login enabled