I\'m building a single page application connected to a rest api, which has some protected routing and stuff (only accessible when user is logged in). So the logic for this r