If the door frame is not up to the task, a better lock or bolt won't do much more than briefly inhibit someone without the key. Kicking the door in is a simple task, unless the door/frame unit is built to withstand that specifically.Switching out new deadbolt
A bolt that goes all the way through the frame of the door and into the track can help. Or, you can cut a length of 1" dowel that just fits into the track of each window and sliding door. But then, windows are glass, and glass is easy to get through, so such precautions are only so effective.A way to lock windows better?
Anything that actually delays an intruder is a good thing. Anything that helps give you advance warning is a good thing.Motion detectors to alarm when sleeping
Consider: a tougher door/frame to the house; secure windows and doors, all around; motion/alarm system; one or more effective four-legged friends (dogs); pick an apartment that has a defensible layout; a heavier door/frame/bolt/lock on the bedrooms, with perhaps a door brace to the floor if insufficient.
These will only help you if you're awake and viewing them. Otherwise, they're only useful for cleanup.Video cameras (in app + one in hallway hidden)
Whatever you can effectively get to, use, and keep from the BG's.Weapons
None of these things make it more liveable, though some of the steps can make it more defensible.
Dogs can be a pain in apartments. Since it's not your place, you'll need to work with the owner for things like a heavy-duty door/frame that can withstand attack. Being on the second floor can help, as folks can simply climb into windows.
Fortifying one room as your "safe room" can help, to which everyone will run if needing to defend, though this depends on being able to get there when needed, which is tough in a small place. Have two independent phones, ie one land line and one cell.