creating client side login revised