I don't see how this could possibly be a problem on the Flex side...it has no way of causing your server to return the wrong result. Have you inspected the traffic using something like Charles Proxy? If so, what is it telling you?
PS. You are going to get yourself in a lot of trouble using topLevelGlobals like this (or in any way whatsoever) http://misko.hevery.com/code-reviewers-guide/flaw-brittle-global-state-singletons/ .
It's not returning the wrong result... The problem is that was it iterates through the IF statement the first time, .lastResult is containing no data, however upon hitting enter the second time, it re-iterates through it again, but this time the .lastResult contains the return statement from the previous attempt, which in turn triggers the IF statement properly.
As for the topLevelGlobal, the only two variable references I use are for storing the username and password for later use inside the mobile app. The other is a simple function to change the viewable tabs upon login in a Tabbed View mobile app. Not really sure of any other way, unless you have a better idea Especially from a local girl
We're actually in Atlanta now. You can send a bubbling event up from the View that a controller (that could be the Application itself, if the project is trivial enough) catches and sets a property on a Model Class. You can either use a Framework like Robotlegs (http://www.developria.com/2010/06/robotlegs-for-framework-beginn.html) to provide references to your Model Classes to any Views that need them, provide it in the pushView method, or you can "roll your own" lightweight framework logic by watching the stage for particular Views to be added to it (some of the concepts defined here here http://www.developria.com/2010/04/combining-the-timeline-with-oo.html can be used to do this).
To answer your first question...you need to realize that calls to the database are asynchronous. You need to attach a responder to the token, and run your logic in the resultHandler.