getUser fails immediately after login

I’m got one step further: I chained the getUser() call after the handleRedirectCallback() promise, and now I’m able to load the user profile on the same page. But if the user refreshes the page, the login information is lost.