Make sure that app has started completely before trying to login.