Separated connection logic from logon logic