making logout button work