Authentication through API working