Added logout functionality