Completing the login flow on client side and also a poc for sending
custom http response code.