I have a chrome extension that when clicked, opens the popup which initiates an xmlhttprequest to a django website.
If the user is logged in, it displays a page and everything works fine. Else, it redirects the user (301) to the authentication page. This also works
This is where im stuck for a while: When the user submits the wrong credentials, the popup goes to the failed login page.(200) <- good If the credentials are correct, it seems as if nothing happens and the user is stuck on the login page even though there was a successful authentication and a cookie is set. in the background i can see that after the post there is a 302 redirect to the post authentication page. in django, the ?next page.
Any ideas as for why it happens? At first i thought it might be related to the 302 redirect so i changed the auth class to return 301 on a successful login but it didnt help.