restructure the method getClientByLogin