     //MARK: - State Management
     private func validateFormItems() {
         var formIsValid = true
-        
+
         if serverURL == nil || (serverURL?.isEmpty)! {
             formIsValid = false
         }
-        
+
         if email?.range(of: "@") == nil || email?.range(of: ".") == nil {
             formIsValid = false
         }
-        
+
         if password == nil || (password?.isEmpty)! {
             formIsValid = false
         }
-        
+
         if isRegistering && password != confirmPassword {
             formIsValid = false
         }
-        
+
         footerView.isSubmitButtonEnabled = formIsValid
     }
-        
+
     //MARK: - Scroll View Delegate
     
     public func scrollViewDidScroll(_ scrollView: UIScrollView) {
-        
+
         if UIApplication.shared.isStatusBarHidden {
             navigationBar.alpha = 0.0
             return
         }
-        
+
         let statusBarFrameHeight = UIApplication.shared.statusBarFrame.height
         navigationBar.frame.size.height = statusBarFrameHeight
-        
+
         // Show the navigation bar when content starts passing under the status bar
         let verticalOffset = scrollView.contentOffset.y
-        
+
         if verticalOffset >= -statusBarFrameHeight {
             navigationBar.alpha = 1.0
         }

        else {
            backgroundView?.backgroundColor = UIColor(white: isDarkStyle ? 0.15 : 0.95, alpha: 1.0)
        }
        
        if effectView != nil {
            effectView?.effect = UIBlurEffect(style: isDarkStyle ? .dark : .light)
        }
        
        // table accessory views
        headerView.style = isDarkStyle ? .dark : .light
        footerView.style = isDarkStyle ? .dark : .light
        
        // table view and cells
        tableView.separatorColor = isDarkStyle ? UIColor(white: 0.4, alpha: 1.0) : nil
        tableView.cellBackgroundColor = UIColor(white: isDarkStyle ? 0.2 : 1.0, alpha: 1.0)
    }
    
    func applyTheme(to tableViewCell: LoginTableViewCell) {
        tableViewCell.imageView?.tintColor = UIColor(white: isDarkStyle ? 0.4 : 0.6, alpha: 1.0)
        tableViewCell.textLabel?.textColor = isDarkStyle ? .white : .black
        
        // Only touch the text field if we're actively using it
        if tableViewCell.textChangedHandler != nil {
            tableViewCell.textField.textColor = isDarkStyle ? .white : .black
            
            if isDarkStyle {
                let placeholderText = tableViewCell.textField.placeholder
                let placeholderTextColor = UIColor(white: 0.45, alpha: 1.0)

        if cell == nil {
            cell = LoginTableViewCell(style: .default, reuseIdentifier: identifier)
        }

        let lastCellIndex = !isRegistering ? 3 : 4

        // Configure rounded caps
        cell?.topCornersRounded    = (indexPath.row == 0)
        cell?.bottomCornersRounded = (indexPath.row == lastCellIndex)

        cell?.imageView?.image = image(forRow: indexPath.row)

        if indexPath.row == lastCellIndex {
            cell?.textLabel!.text = "Remember My Account"
            cell?.switch.isOn = rememberLogin
