Added cookie support

Uses cookies for some features if URL vars aren't passed and cookies are
available.