fixed api login

i was previously actually only getting a list of users, now we are
actually logging the user in. lines 62 and 63 were the problem