Spring Security RememberMe cookie automatically removing
<pre>
After Signup I am performing autoLogin as follow.<br>After that i want to create Spring Security RememberMe cookies it is creating successfully<br>but, once my browser closed and start again i opened my web page<br> at that time the cookie is removing

<b>***My Code***</b>
<code>
  private void autoLogin(final Member member,
        final HttpServletRequest request, final HttpServletResponse response) {
        final Collection<GrantedAuthority> authorities =
            new ArrayList<GrantedAuthority>();
        authorities.add(new SimpleGrantedAuthority("ROLE_USER"));

        final UsernamePasswordAuthenticationToken authentication =
            new UsernamePasswordAuthenticationToken(member.getEmail(),
                member.getPassword(), authorities);
        SecurityContextHolder.getContext().setAuthentication(authentication);

        final CustomUserDetails customUserDetails =
            new CustomUserDetails();
        final TokenBasedRememberMeServices rememberMe =
            new TokenBasedRememberMeServices("nykeysecret", customUserDetails);

        rememberMe.onLoginSuccess(request, response, authentication);
    }
Spring Security RememberMe cookie automatically removing
===

<pre>
After Signup I am performing autoLogin as follow.<br>After that i want to create Spring Security RememberMe cookies it is creating successfully<br>but, once my browser closed and start again i opened my web page<br> at that time the cookie is removing

<b>***My Code***</b>
<code>
  private void autoLogin(final Member member,
        final HttpServletRequest request, final HttpServletResponse response) {
        final Collection<GrantedAuthority> authorities =
            new ArrayList<GrantedAuthority>();
        authorities.add(new SimpleGrantedAuthority("ROLE_USER"));

        final UsernamePasswordAuthenticationToken authentication =
            new UsernamePasswordAuthenticationToken(member.getEmail(),
                member.getPassword(), authorities);
        SecurityContextHolder.getContext().setAuthentication(authentication);

        final CustomUserDetails customUserDetails =
            new CustomUserDetails();
        final TokenBasedRememberMeServices rememberMe =
            new TokenBasedRememberMeServices("nykeysecret", customUserDetails);

        rememberMe.onLoginSuccess(request, response, authentication);
    }