cleaned up login : more in the client less in the server