modified index view to add cookie and session.