changes to the way connection is loaded to ensure pw is decrypted once and only once