added logout functionality in index.js

needs to be hooked to a button