Update session tracking; modify index behavior.

Update logged-in session tracking. Begin using flask-shelve instead of python
shelve, for increased write-conflict prevention, and make appropriate
changes to function calls. Make shelve store hashed passwords. Edit
index.html to display a Login/Logout hyperlink appropriately.