Added dialog for setting up a connection.
Deleted unnecessary code.