Refactored the registration of a new candidate in the UI tests