Add login logic and API calls