title: Symfony2 Login redirect after ajax request
body: <p>I'm building a site with user accounts using Symfony2, and I have a section where the user has a list of items, all of which can be edited when clicked on.</p>
  
  <p>Currently when the user clicks on an item to edit, there will be an ajax request to pull all information related to that item, and build a form, then that form will be placed inside the current page.</p>
  
  <p>Now here's my problem, say a user is on their items page, and they clear their browser cache (and are logged out), when they click on an item to edit, I've set it up so nothing will happen, but if they immediately attempt to login after that (using the standard website.com/login page), they are redirected to the form that they were attempting to load previously. (This page only contains a form, nothing more, so it would probably confuse the user).</p>
  
  <p>I've already setup Symfony2 to redirect after login to the users profile page, but still, it redirects to the form from the ajax request after login.</p>
  
  <p>I just want the user to be redirected to their profile page after any login under any circumstances.</p>