Added logout method.