$(function() {

	$('button[type="submit"]').on('click', function() {
		if($('#remember').is(':checked')) {

			if (typeof(Storage) !== "undefined") {
				var email = $('input[name="email"]').val();
				var pass = $('input[name="password"]').val();
	  
				localStorage.setItem('email', email);
				localStorage.setItem('pass', pass);
			}
		}
	});

	$(document).ready(function() {
		$('input[name="email"]').val(localStorage.getItem('email'));
		$('input[name="password"]').val(localStorage.getItem('pass'));
	});

});