Added logout button and logic