Windows 8.1 is much better in terms of security. But, Windows 7 is more user friendly (it has a start menu) If you are willing to get used to Windows with a different way of accessing the start menu to do things like shutdown your system, pick Windows 8.1. If you still like having the start menu at the bottom left corner of your screen, choose WIndows 7.
Although these are good options, Windows 10 has brought back the start menu and in a few years, when most of the Windows 10 bugs are fixed, It would be a better choice between 8.1 and 7