Next time you're in a living situation, don't volunteer such things and don't agree to them unless there is something in writing. What should be in writing? Specifying how long the guy will stay, what he's paying for (groceries, utilities), what his rent is. And make it abundantly clear that your bedroom is off-limits to him unless you invite him in, even if your roommate is with him and he needs a book from your bookcase.
Install some simple hook and eye locks. They are cheap and easy to put in.
STOP BEING A VICTIM.
You do not owe this guy or your roommate niceness and concessions and letting them walk all over you.
Roommate situations are hard enough without introducing someone into the mix who has an open-ended invitation to hang around, doesn't seem to have any obligations to pay for anything, and also seems to be clueless as to physical boundaries.