       style      : 'TeamsModal-button TeamsModal-button--green'
       type       : 'submit'
 
+    teamData = KD.utils.getTeamData()
 
     if @alreadyMember
-      email = KD.utils.getTeamData().signup.username
-      @username.setValue email
+      { username } = teamData.signup
+      @username.setValue username
       @password.destroy()
       @password = new KDInputView
         type          : 'password'

    if @alreadyMember
      """
      <div class='login-input-view'><span>Password</span>{{> @password}}</div>
      <p class='dim'>Since you're already a Koding user to join <i>#{KD.config.groupName}</i> you need to enter your koding.com password to proceed.</p>
      <div class='login-input-view tr'>{{> @checkbox}}{{> @label}}</div>
      {{> @button}}
      """

          messages    :
            required  : 'Please enter a password.'

    email = teamData.invitation?.email

    @email = new KDInputView
      name         : 'email'
      placeholder  : 'Email address'
      defaultValue : if @alreadyMember then username else email
      validate     :
        rules      :
          email    : yes
