added logout button and made a few other corrections