Added logout functionality and button