Improving the Server Login Code