API call to isLoggedIn after dom is rendered.