In terms of checking auth, you are on the right path, but you can make it a bit simpler than what you have.
You dont need to call the APIs on load if you set them to auto-fetch.
That way APIs specified on pages will also be fetched during SSR for a faster overall load time.
I don't think you need to save the userid to local storage, since you are fetching the user data anyways. This request can also be auto fetched.
The way you validate the user has an active session is by calling an API. One way of thinking about it is that it is not the page that is protected, it is the data. If that data cannot be fetched because the user is not authenticated, then you redirect to login.
We have a few things in the pipeline that will make this easer to replicate across different pages and components. First with our new API V2 that is currently being finished, and later by giving you better tools for controlling the head section of the page.