Can autologin be set up from the command line? how?
You need to create the /etc/kcpassword file.

There is a small utility that will do this for you: https://github.com/xfreebird/kcpassword.

This is just a simple wrapper around this script: https://github.com/timsutton/osx-vm-templates/blob/master/scripts/support/set_kcpassword.py

which is itself a python translation of the original perl script from Gavin Brock: http://www.brock-family.org/gavin/perl/kcpassword.html