added support for cookie based password saving