Added Login functionality to the API