Added onClick function on logout button because didn't work