diff --git a/Controller/CustomerController.php b/Controller/CustomerController.php
index <HASH>..<HASH> 100644
--- a/Controller/CustomerController.php
+++ b/Controller/CustomerController.php
@@ -327,6 +327,12 @@ class CustomerController extends BaseFrontController
 

                         $this->processLogin($customer);

 

+                        if (intval($form->get('remember_me')->getData()) > 0) {

+                            // If a remember me field if present and set in the form, create

+                            // the cookie thant store "remember me" information

+                            $this->createRememberMeCookie($customer);

+                        }

+

                         return $this->generateSuccessRedirect($customerLoginForm);

 

                     } catch (UsernameNotFoundException $e) {

@@ -364,6 +370,8 @@ class CustomerController extends BaseFrontController
             $this->dispatch(TheliaEvents::CUSTOMER_LOGOUT);

         }

 

+        $this->clearRememberMeCookie();

+

         // Redirect to home page

         return $this->generateRedirect(URL::getInstance()->getIndexPage());

     }
Refactored existing remember me process