Added Logout function.