diff --git a/modules/core/templates/loginuserpass.php b/modules/core/templates/loginuserpass.php
index b1e627adc76c7b21eb33020ef21baf7fb4776eb5..a87c5d965f0ec854d23f22fc2a0c64c0a0e3c717 100644
--- a/modules/core/templates/loginuserpass.php
+++ b/modules/core/templates/loginuserpass.php
@@ -64,10 +64,10 @@ if ($this->data['errorcode'] !== null) {
                            name="remember_username" value="Yes"/>
                     <small><?php echo $this->t('{login:remember_username}'); ?></small>
                 </td>
-            </tr>
             <?php
             }
             ?>
+            </tr>
             <tr>
                 <td><label for="password"><?php echo $this->t('{login:password}'); ?></label></td>
                 <td>
@@ -83,9 +83,11 @@ if ($this->data['errorcode'] !== null) {
                            name="remember_me" value="Yes"/>
                     <small><?php echo $this->t('{login:remember_me}'); ?></small>
                 </td>
-            </tr>
             <?php
             }
+            ?>
+            </tr>
+            <?php
             if (array_key_exists('organizations', $this->data)) {
                 ?>
                 <tr>