input: Write a python function to automate login to a website using Selenium.
  assert login_to_website('https://www.example.com/login', 'example_username', 'example_password')=='https://www.example.com/home'
  assert login_to_website('https://www.differentwebsite.com/login', 'user', 'pass')=='https://www.differentwebsite.com/home'
output: def login_to_website(url, username, password):
      from selenium import webdriver
      from selenium.webdriver.common.by import By
      from selenium.webdriver.common.keys import Keys
      from selenium.webdriver.chrome.service import Service as ChromeService
      from webdriver_manager.chrome import ChromeDriverManager
      import time
  
      # Set up the WebDriver
      driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))
      
      try:
          # Navigate to the login page
          driver.get(url)
  
          # Find username and password fields and the login button
          username_field = driver.find_element(By.NAME, 'username')
          password_field = driver.find_element(By.NAME, 'password')
          login_button = driver.find_element(By.NAME, 'login')
  
          # Enter the username and password
          username_field.send_keys(username)
          password_field.send_keys(password)
  
          # Click the login button
          login_button.click()
  
          # Wait for the page to load
          time.sleep(5)  # Adjust the sleep time according to the website's response time
  
          # Get the current URL after login
          current_url = driver.current_url
  
      finally:
          # Close the WebDriver
          driver.quit()
  
      return current_url