This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
This happens automatically. But I noticed you had default-target-url, which to me says after logging in send them to that page. If you remove it it should redirect them back to the page they tried to view, unless they enter invalid login stuff. which takes them to the general/home page
I would recheck the attributes to make sure they mean what you expect them to mean. I think you possibly just copied and pasted this from somewhere else expecting it to work correctly without understanding what it all meant.