[Screenshot] Fix log out issue in Django middleware

Created a middleware but it cockblocked the logging out mechanism.

image0