       formData.firstName       = firstName?.getValue()
       formData.lastName        = lastName?.getValue()
 
+      @signupModal.destroy()
       @doRegister formData, @registerForm
-      @signupModal.destroy()
     else if usernameCheckTimer?
       @signupModal.setOption 'pendingSubmit', yes
 

        defaultValue : familyName
        label        : 'Last Name'


    @signupModal = new KDModalViewWithForms
      cssClass                        : 'extra-info password'
      width                           : 360


  usernameCheck:(input, event, delay=800)->

    return  if event?.which is 9
    return  if input.getValue().length < 4

    KD.utils.killWait usernameCheckTimer
    usernameCheckTimer = null

    input.setValidationResult "usernameCheck", null
    username = input.getValue()

    if input.valid
      usernameCheckTimer = KD.utils.wait delay, =>
        return  unless @signupModal?

        $.ajax
          url         : "/Validate/Username/#{username}"
          type        : 'POST'
