cleaned up settings dialog; optimized SFTP connection so it only establishes the connection when necessary