Cannot login after enabling "don't ask for password on login"

Try this:
Power on the PC, hold SHIFT till you see the GRUB menu.
Go to "Other Options for Ubuntu" or equivalent.
Boot last kernel in recovery mode.
Select 'root' to perform admin tasks.
Once in the root shell, issue the command:

mount -o remount,rw /

Then use the command:

passwd you

(Where 'you' is your user name on the machine)
You'll be asked twice for the new password, and won't see stars echoed back to you as you type - this is normal.

Then reboot using:

init 6

Edit: advising this because of this comment from @lah7

Edit: also see this: