                    show_only('#register-message-' + state);
                        }
                    })
                    .fail(function(jqxhr, status, e) {
                    console.log(e);
                        if ((e.status == 'error') && (e.reason == 'DuplicateUser')) {
                            var errors = [ $("#errorReason-DuplicateUser").text() ];
                            show_errors("#register-error", errors);
                            $('#register-email').focus();
              