improving the Client Login Code.