select password tesxtfield and press enter

hi,
I am facing a problem. i wrote the script to login USER when mac start…in 10.6.x there is “Log In” button on screen.
but in 10.7.x & 10.8.x there is no login button …you have to enter the password and press enter while password field is selected… or there is small “->” button is embedded is password field which will appear when you enter password .

i wrote the script which fill both username and password and then i do is
keystroke return
key code 36
but its not working… can i fill the password field and press enter in one statment of how i get the name of “->” login button from screen…plz help