Fix for-loop error

see #34
Using first entry for login

see #34