Added a ready state so that we can immediately switch to login or page when the app starts.