I think the mayor does know who Emma is and knows exactly what is going and who she and everyone else is. It really looks to me like Rumple knows also.