Flash movie not doing what I'd expect!

Can anyone help me with this?

I have this flash site that is an editor interface for a database. I used the tutorial on this site to add a password login. However for some reason the editor isn’t working quite right now. Basically there is a frame which has two buttons which is within the password checking frames. These are just simple links to the either of the next two frames in the movie. These links work without the initial frame with the password code in but as soon as you add it the buttons don’t seem to behave properly and briefly flash the correct page but then returns the the frame with the buttons in.

There is the flash file attached but just in case its blindingly obvious here is the actionscript from the first frame:


stop();
userinput.restrict="a-zA-Z0-9";
Selection.setFocus(userinput);
passinput.restrict="a-zA-Z0-9";
status="Enter your information and submit";
this.onEnterFrame = function () {
    if(_root.checklog == 1){
        _root.gotoAndStop("choice");
    }
    if(_root.checklog == 2){
        _root.gotoAndStop(5);
    }
}

where the frame label choice is the frame with the buttons in. Why would this code effect the next frame? Is it to do with the onEnterFrame command.

Any help much appreciated.