How do I force my Mac to log in to an account remotely?
I created something like this for Remote Desktop to signing a xServe. We had more than 1 account, and we had to sign un with both username and password. I ran this remotely through the terminal to prior to pulling up the screen.
`osascript -e 'tell application &quot;System Events&quot;' -e 'keystroke &quot;USERNAME&quot;' -e 'keystroke tab' -e 'delay 0.5' -e 'keystroke &quot;PASSWORD&quot;' -e 'delay 3.5' -e 'keystroke return' -e 'keystroke return' -e 'end tell'`

Just replace the USERNAME and PASSWORD and that should work.  I have not tested this on a more recent OS, but I hope this helps.