XF 1.4 Account sync with other websites

Hello XenForo community,
I hope that you here can enlighten me on the steps i should take to make the next things possible.
I have some site which have a different database where the user accounts are saved.I want to make it that the users over there have the option to sync / link their forum accounts with it.Like the press a link forum button and enter the forum name and pass and if its correct it will do a secondary usergroup assignment to the forum account.

Thanks in advance!