Alternative connection function

As far as tested, it avoids the problem of requesting identities twice (thus firing callback-function twice).