Changes to index.  Added logout function.