Restore old connection only after login is done and connection is ready