Added logout function call