You might want to start strengthening your back before you try squats and deadlifts.
The deadlifts could have strained your spinal erectors, especially if you were performing it with poor form, such as a rounded lower back mixed with lifting your hips too high, or pulling with too great (forward) an angle while pulling from the bottom.
Keep strengthening your back through your standard exercises, such as chin ups, seated row, lat pull down, t-bar rows, bent over rows. Through in some one-arm rows, whichever your preference.
Be careful with some lower back exercises, but you should be working with some hyper-extensions. Start with body-weight and higher reps for a few weeks then work up to holding a plate, then a heavier dumbell etc. As Eric Cressey and other authors on here have pointed out, don’t hyper-extend beyond the 180 degrees. Only to parallel is fine.
For more lower back work and working on strengthening your hamstrings, do some cable pull-throughs. If you don’t know how these are done, you face away from a cable stack, use the lower attachment, preferably with a rope. While standing upright, away from the cable machine and rope between your legs, punch your butt back as far as possible, arms entirely straight, feel the stretch in your hamstrings. Then push your butt/pelvis through as if you were performing a deadlift at lockout and ‘f*cking the bar’. Your back and legs will be on fire.
If you’re still wanting to work your legs, without overloading your back, give the old pistol squats a go. These can be done at home - the one legged squat. It’s quite a tough one to do but you can work up to holding a dumbell against your chest. Otherwise try some lateral lunges, bodyweight and weighted with a barbell on your back, to work the inside of your thighs, your adductors, as if you were performing a wide squat. Still keep using the leg press to work your quads.
This should take care of your back, lower back, hamstrings, and strengthen parts of your legs such as your adductors for when you get back to squatting and deadlifting.
And check out some foam-roller exercises incase your back is overly tight and needs some tissue release. Rolling on a tennis ball will even help.