I'm assuming you're using AS2 here...
If your button and your textbox are siblings (ie both contained in the same parent clip), then you can use this code on your button:
on (release) {
trace(this);// should be 'login'
trace(this.username.text);// should be the content of username textbox
}
This assumes that your button is tracked as a button and not a movieclip, otherwise you could use this._parent.username.text
to get the contents of the textbox.
Another way is to use absolute addressing, but this is not recommended, since it's easy to break: either _level0.login.username.text
or _root.login.username.text
Hope this helps!