Added logout functionality.