Added logout button and fixed logout bug not clearing session.