Lionel Ainsworth struck a glorious first goal for Motherwell to earn a 2-2 draw against Dundee United at Tannadice.