Here's a quick intro to swap space and how you can create new swap space on Ubuntu 16.04. It will most likely work verbatim on other Ubuntu versions, as well as other distributions of GNU/Linux too.
Here's the problem. You want to prevent access to parts of your app for users that are not logged in, and additionally you want to prevent logged in users without the right role or access level (non-admins typically) from accessing yet more parts of your app. You are using
redux and maybe even
react-router (and its trusty companion