Working login client side