fix logout buttons
added logout function