How to check if user is logged in on mobile app project and send to login page if not?

I only read Apple’s comment and wanted to chime in.
Don’t have space right now to read the entire thread, so sorry if this doesn’t help at all.

I’m struggling often with the timing of some on page javascript/page flows/ and server connects.
What might help:

  1. Adding a small delay with a ‘wait’. Usually wait 1 will work, but I had to up mine to wait 10 because it was ‘losing the race’ often.

Somewhere on the forum you can find Patrick recommending this.

  1. This might help: How to run a JS function after DOM is complete && server connect is done?