Made logout button functional