Improving the Client Login Code