Second portion of the login server code