How to start activity and end all other activities that was launched before

view story

http://stackoverflow.com – I have one login activity in my soft and one main activity . What i want to do is start login activity ,log user and then start the main activity ,and delete the login activity from the stack so the user can acess the login activity by pressing back button. Whitch intend flag should i use? (HowTos)