This code is almost exactly the same as the block above it. A better way of writing this would be something along the lines of

```
if (err) {
  // Refresh reCaptcha
  if (recaptchaEnabled) {
    Recaptcha.reload();
    // The user entered an invalid reCaptcha token
    if (err.msg === 'Invalid reCaptcha token') {
      showRecaptchaError();
    }
    // Unlock the register button
    $('button, input', $rootel).prop('disabled', false);
} else {
  oae.api.authentication.localLogin(values.username, values.password, function() {
    // Relocate to the user home space
    window.location = '/me';
  });
}
```