What potential security risks are present in the provided login script due to the use of md5 for password hashing?

Using md5 for password hashing is not secure as it is a weak hashing algorithm that can be easily cracked using modern hardware. It is recommended to use stronger hashing algorithms like bcrypt or Argon2 to securely hash passwords. By switching to a stronger hashing algorithm, the security of user passwords can be greatly improved.

// Fix: Using bcrypt for password hashing
$hashed_password = password_hash($password, PASSWORD_BCRYPT);