Victory for council and residents after hotel loses licence