Connection logic and rompt history