adding loggin for api