Added logout button and functionality.