Added login for api