If you own your house, put a good solid-core door on the bedroom. Top of the stairs is as good a place as any, you can scurry back into the room if you have to. Make sure there is a cell phone in the fallback area.
Don't hesitate to shoot. Once they mount the stairs, they are into the occupied area and have forsaken burglar and property crimes for something much worse. You don't have to ask them their intentions first, divine the entrails of a raccoon, or cite state-specific case law beforehand.