Fix relogin when connection (xmpp)

When creating an agent in the during the bootstrap, he will try to relogin, but this fails because there is already a connection. This connection is now first closed.