client side login logic complete