diff --git a/django/contrib/auth/middleware.py b/django/contrib/auth/middleware.py
index df616a9..bdb5e85 100644
a
|
b
|
class RemoteUserMiddleware(object):
|
50 | 50 | # If specified header doesn't exist then return (leaving |
51 | 51 | # request.user set to AnonymousUser by the |
52 | 52 | # AuthenticationMiddleware). |
| 53 | if request.user.is_authenticated(): |
| 54 | auth.logout(request) |
53 | 55 | return |
54 | 56 | # If the user is already authenticated and that user is the user we are |
55 | 57 | # getting passed in the headers, then the correct user is already |