fixed api login issue