I want to develop a mobile app using the Web stack and package with phonegap.
My index.html page will contain a login form. I have a js function `checkLoggedIn()`;
that checks if user is logged in by looking for a localStorage variable.

**Challenge** : I want `index.html` to automatically redirect to `member.html` if `checkLoggedIn()` 
returns `true`; otherwise it won't redirect and just stays on `index.html`, that means `checkLoggedIn()` will run on `index.html` on load.  

I don't know what kind of event to fire or how to fire it to achieve this.