There are a number of sources of information available to tell you what you should do when being stopped by the police. One that has been refered to in the E2 context is the ACLU "bustcard": http://www.aclu.org/Files/OpenFile.cfm?id=10042
Most others are similar.
In many respects these provide very good advice. In the following I'll just refer to the "bustcard". It tells you that you should always talk to a lawyer before talking to police and outlines a number of rights that you may or may not have in your jurisdiction.
That is the point I would make here. REMEMBER, your jurisdiction may differ!! see YMMV ;)
I would recommend to you that you find out what your rights are in your area rather than go straight from this card. I'll give you a few examples from my experience to back this up.
Firstly the above "bustcard" states that you cannot be arrested for refusing to give your name and address, however in the Australian Capital Territory (ACT) you can be. If a police officer has reasonable grounds to believe that you have information in respect to an offence (i.e. you were a witness to someone being naughty) you MUST provide your name and address if requested. If you don't you are committing an offence and may be arrested. This is to ensure all relevant witnesses appear before court when a person is defending themselves.
One of the reasons for arresting a person in the ACT when committing an offence is that you can't guarantee their appearance before court, if you don't know who they are or where they live you can't summons them.
Another example where the bustcard doesn't always pan out is that in the ACT you do not have the right to a phone call. If the police officers are in a good mood, or you are being reasonable you will usually receive one if you ask, however if you've made them run I don't rate your chances ;)
The above also relates to the opportunity to speak to a lawyer. If you've been charged and arrested and don't wish to talk to police then they don't have to let you talk to a lawyer until just before your court appearance (which will be first thing the next morning if it isn't that day). They will generally let you if you wish though, it makes everyone's life easier.
When it comes to your home it is definitely a case of your house is your castle. For most things in the ACT, such as arrest, search of the person and other things, a police officer needs only have suspicion. To enter your home an officer needs belief. However they don't need to be chasing someone to come in as the bustcard would suggest. If they believe that an offender is in a premises they can enter to arrest them. For example if every time you escape custody you run to your mamma's house and hide there it is very likely that the next time it happens your mamma's door may get a knock that's less than subtle.
I suppose the point I'm trying to get across here is that you should always be careful that you actually have a right before you tell a police officer they can't do something. You may be wrong!
As someone who's seen the ins and outs of a few arrests I would suggest that the best thing you can ever do when dealing with a police officer in a stressful situation is do what you are told. If you don't think it's fair or right you can do something about it later. Most police departments these days take complaints very seriously. If you start to argue or badmouth then you'll probably find your situation getting worse not better, even if you're right.
It may not be good or fair but it's life.
Hope that helped and wasn't just a plain old rant ;)