diff --git a/src/Form/CLUListingUsers.php b/src/Form/CLUListingUsers.php
index 63e2f94..013de3d 100644
--- a/src/Form/CLUListingUsers.php
+++ b/src/Form/CLUListingUsers.php
@@ -29,7 +29,16 @@ class CLUListingUsers extends FormBase {
    * {@inheritdoc}
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
+    $search_value = $form_state->getValues();
     $user = \Drupal::currentUser();
+    $form['search_user'] = array(
+      '#type' => 'textfield',
+      '#title' => 'Username',
+    );
+    $form['search_submit'] = array(
+      '#type' => 'submit',
+      '#value' => 'Search',
+    );
     $header = [
       'user_id' => t('USER ID'),
       'user_name' => t('USERNAME'),
@@ -37,14 +46,18 @@ class CLUListingUsers extends FormBase {
       'hostname' => t('hostname'),
       'action' => t('OPERATIONS'),
     ];
+    $search_uname = $search_value['search_user'];
     $query = \Drupal::database()->select('sessions', 's');
     $query->join('users_field_data', 'u', 's.uid = u.uid');
-    $query->fields('u', array('uid'))
-      ->fields('u', array('name'))
-      ->fields('s', array('timestamp'))
-      ->fields('s', array('hostname'));
+    $query->fields('u', array('uid'));
+    $query->fields('u', array('name'));
+    $query->fields('s', array('timestamp'));
+    $query->fields('s', array('hostname'));
     $query->orderBy('uid', 'DESC');
     $query->distinct();
+    if (isset($search_uname) && !empty($search_uname)) {
+      $query->condition('u.name', db_like($search_uname) . '%', 'LIKE');
+    }
     $results = $query->execute()->fetchAll();
     $output = '';
     foreach ($results as $result) {
@@ -88,15 +101,21 @@ class CLUListingUsers extends FormBase {
    */
   public function validateForm(array &$form, FormStateInterface $form_state) {
     $value_checked = $form_state->getCompleteForm()['table']['#value'];
-    if (empty($value_checked)){
+    $submit_value = $form_state->getValues()[op];
+    if ($submit_value == 'End sessions') {
+      if (empty($value_checked)) {
       $form_state->setErrorByName('clu_table', $this->t('Please select atleast one user to terminate the session.'));
     }
   }
+  }
 
   /**
    * {@inheritdoc}
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
+    $form_state->setRebuild(TRUE);
+    $submit_value = $form_state->getValues()[op];
+    if ($submit_value == 'End sessions') {
     $current_user = \Drupal::currentUser();
     $uids = $form_state->getValues()['table'];
     foreach ($uids as $delete_session_uid) {
@@ -112,6 +131,7 @@ class CLUListingUsers extends FormBase {
       }
     }
   }
+  }
 
   /**
    * Callback function for getting last login time.
