Login Required Redirect:
to understand where the problem is:
- uncomment line 33 in /twittme-web/src/lookup/components.js
- uncomment line 48 in /tweets/api/views.py
- “console.log(“error”, e);” on line 42 in /twittme-web/src/lookup/components.js

reactjs redirect:
to test, npm start and runserver, access localhost:30 (reactjs)
for CORS, we don’t need “HTTP_X_REQUESTED_WITH” anymore, so:
- don’t add that header in /twittme-web/src/lookup/components.js
//...if (csrftoken) {//xhr.setRequestHeader("HTTP_X_REQUESTED_WITH", "XMLHttpRequest");xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");xhr.setRequestHeader("X-CSRFToken", csrftoken);}//...
another error is if we like, unlike or retweet, we got a 403 error: 
add a 403 redirect step in /twittme-web/src/lookup/components.js ```javascript xhr.onload = function () {
//new
if (xhr.status === 403) {
const detail = xhr.response.detail;if(detail === "Authentication credentials were not provided."){window.location.href = "/login?showLoginRequired=true"}
}
callback(xhr.response, xhr.status); };
access localhost:30 again: <br /><br />becuase everytime we get a 403, our url is redirected (but cannot handle it due to no corresponding page)<a name="280cY"></a>#### django redirect:- replace files in /static/js with files in /twittme-web/build/static/js- change script src in /templates/react/js.html to new filenames in /static/js```html<!--<script src="/static/js/2.08ec51a1.chunk.js"></script><script src="/static/js/main.b5a8ce6c.chunk.js"></script>--><script src="/static/js/2.08ec51a1.chunk.js"></script><script src="/static/js/main.3b3942bc.chunk.js"></script>
After that, we test by using incognito window, localhost:80(django) :
if we like, unlike or retweet, we get 404 with “/login?showLoginRequired=true”
if we tweet, we get 403 and then 404

so that django applied this login required redirect, either:
