The Utah legislative session ended on a fiery note as lawmakers approved a bill that critics say unfairly targets an elected official.