added logout functionality (hopefully)