please check how this code looks like and improve its syntax and structure
improve the code if you see something wrong
do not add features
think like an engineer, if there are overcomplicated things, simplify them but make them do the same.

import requests
from urllib3.exceptions import InsecureRequestWarning
import sys

CONFIG = {
    'base_url': 'https://10.0.4.2',
    'username': 'misael_campos',
    'password': 'd337O8AetR3p4',
}

class AuthenticatedScraper:
    def __init__(self, base_url):
        # Disable SSL verification warnings
        requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
        
        self.base_url = base_url
        self.session = requests.Session()
        # Disable SSL certificate verification
        self.session.verify = False
        
    def login(self, username, password):
        """
        Authenticate with the server
        Returns True if login successful, False otherwise
        """
        login_url = f"{self.base_url}/action/main.html"
        
        login_data = {
            'user': username,
            'pass': password,
            'button': 'Login',
            'who': '100'
        }
        
        try:
            response = self.session.post(
                login_url,
                data=login_data,
                verify=False
            )
            
            # Check if login was successful
            if response.status_code == 200:
                if "Sorry, you do not have access to enable config system." in response.text:
                    print("Login failed: Access denied")
                    return False
                return True
            else:
                print(f"Login failed with status code: {response.status_code}")
                return False
                
        except requests.exceptions.RequestException as e:
            print(f"Error during login: {e}")
            return False
            
    def scrape_optical_info(self):
        """
        Scrape the optical info page
        Returns the HTML content if successful, None otherwise
        """
        target_url = f"{self.base_url}/action/pononuopticalinfo.html"
        
        try:
            response = self.session.get(
                target_url,
                verify=False
            )
            
            if response.status_code == 200:
                return response.text
            else:
                print(f"Failed to fetch optical info. Status code: {response.status_code}")
                return None
                
        except requests.exceptions.RequestException as e:
            print(f"Error fetching optical info: {e}")
            return None

def main():
    # Initialize scraper with configured parameters
    scraper = AuthenticatedScraper(CONFIG['base_url'])
    
    # Attempt login with configured credentials
    if scraper.login(CONFIG['username'], CONFIG['password']):
        print("Login successful!")
        
        # Scrape optical info
        content = scraper.scrape_optical_info()
        if content:
            print("\nSuccessfully retrieved optical info:")
            print("-" * 50)
            print(content)
            
            # Save to file
            with open('optical_info.html', 'w', encoding='utf-8') as f:
                f.write(content)
            print("\nContent saved to 'optical_info.html'")
    else:
        print("Failed to login. Please check your credentials.")

if __name__ == "__main__":
    main()