title: Java web application secured authorization via cookies
body: <p>I have a java servlet web application. In the application I have two authorization logics: 
  1. Authorization via username and password - standart login via web form with username and password which user fills up.
  2. Authorization via cookies. Once, user fills up username and password, and checks a checkbox 'remember me', after this he shouldn't enters username/password. 
  I have a question about option number two (cookies). At the moment logic is: I check if user checked 'remember me', I get his username and password hash, and store it to the cookies. (Two cookies: <strong>username</strong>, <strong>password</strong>) But, I think that the way is not secured. Because somebody can steal the cookies and get access to the web app. 
  Question is: what is the best secured way to authorized user via cookies? What should I store in the cookeis?</p>