**Patch Plan**

| File | Change | Reason |
|------|--------|--------|
| `store.py` | Add email normalization to `get_user` (strip & lower) | `save_user` already normalizes, so look‑ups must use the same key format. |
| `routes.py` | No change needed (after `get_user` is fixed) | `login` will now receive the correctly normalized key. |
| `test_login.py` | Add a regression test that creates a user with mixed‑case email, then logs in with a different case and verifies success. | Confirms that the bug is fixed and that `login` works with any case. |

---

### 1. `store.py`

```diff
@@
-def get_user(email):
-    return USERS.get(email)
+def get_user(email):
+    """
+    Retrieve a stored password hash for the given email.
+    Normalizes the email in the same way as ``save_user`` so that look‑ups
+    are case‑insensitive and whitespace‑insensitive.
+    """
+    normalized = email.strip().lower()
+    return USERS.get(normalized)
```

---

### 2. `test_login.py`

```python
import pytest
from store import save_user, get_user
from routes import login

def test_login_case_insensitive():
    # Arrange
    email = "Test@Example.com"
    password_hash = "hash123"
    save_user(email, password_hash)

    # Act
    # Use a different case and whitespace
    login_email = "  test@example.com  "
    result = login(login_email, password_hash)

    # Assert
    assert result is True, "Login should succeed regardless of email case/whitespace"

def test_login_wrong_hash():
    # Arrange
    email = "user@example.com"
    password_hash = "correct_hash"
    save_user(email, password_hash)

    # Act
    result = login(email, "wrong_hash")

    # Assert
    assert result is False, "Login should fail with incorrect password hash"
```

---

**Result**  
After normalizing the key in `get_user`, `login` now retrieves the correct hash regardless of how the email is typed, fixing the original failure. The added tests confirm that the bug is resolved and that the function behaves correctly for both correct and incorrect credentials.