There are many methods including rhosts and ssh key exchange (probably your best bet) .. but since you suggested expect in your subject - here is an expect example for login automation. There are many expect tutorials available if you search for them
Code:
#!/usr/bin/expect -f
spawn telnet yourhostname
expect "login"
send "jprathap\r"
expect "Password:"
send "123jprathap123\r"
interact