Add login logic for sign up or log in