check if login and else call api