fixing API url, add login to Front-end