As I see it Jesus did have a close relationship with Mary Magdalene, the gospels have downplayed the role she had in the early church. It is doubtful it was anything beyond a close friendship....
Hard to explain why Mary anointed Jesus,
in a manner reserved for noble weddings then.
I'm guessing that there was a specific attempt
to discredit the marriage (too human?) as well
as Jesus's claim to the actual throne of Israel.
See, when he's looked at as a member of the
royal family (traced through JOSEPH - who isn't
supposed to even be related), it kinda kills the
whole 'son of God' thing, no? Christianity had it's
reasons for preventing this side of the story from
being told. And, not many others were talking about
him.